| Index: ios/chrome/browser/ui/suggestions/suggestions_expandable_item_unittest.mm
|
| diff --git a/ios/chrome/browser/ui/suggestions/suggestions_expandable_item_unittest.mm b/ios/chrome/browser/ui/suggestions/suggestions_expandable_item_unittest.mm
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..28ba8c9e0e286a5a6cf6b3a073a2d4c6372fa931
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/ui/suggestions/suggestions_expandable_item_unittest.mm
|
| @@ -0,0 +1,33 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#import "ios/chrome/browser/ui/suggestions/suggestions_expandable_item.h"
|
| +
|
| +#import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +namespace {
|
| +
|
| +TEST(SuggestionsExpandableItemTest, CellIsConfigured) {
|
| + NSString* title = @"testTitle";
|
| + NSString* subtitle = @"testSubtitle";
|
| + UIImage* image = [[UIImage alloc] init];
|
| + NSString* details = @"testDetails";
|
| + SuggestionsExpandableItem* item =
|
| + [[SuggestionsExpandableItem alloc] initWithType:0
|
| + title:title
|
| + subtitle:subtitle
|
| + image:image
|
| + detailText:details];
|
| + SuggestionsExpandableCell* cell = [[[item cellClass] alloc] init];
|
| + EXPECT_TRUE([cell isMemberOfClass:[SuggestionsExpandableCell class]]);
|
| +
|
| + [item configureCell:cell];
|
| + EXPECT_EQ(title, cell.titleLabel.text);
|
| + EXPECT_EQ(subtitle, cell.subtitleLabel.text);
|
| + EXPECT_EQ(image, cell.imageView.image);
|
| + EXPECT_EQ(details, cell.detailLabel.text);
|
| +}
|
| +
|
| +} // namespace
|
|
|