| Index: ios/chrome/browser/ui/content_suggestions/content_suggestions_image_updater_unittest.mm
|
| diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_image_updater_unittest.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_image_updater_unittest.mm
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..33852bb3c397d49d46404373da8bb1eff7cb3ec6
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_image_updater_unittest.mm
|
| @@ -0,0 +1,31 @@
|
| +// 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/content_suggestions/content_suggestions_image_updater.h"
|
| +
|
| +#import <UIKit/UIKit.h>
|
| +
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +#import "third_party/ocmock/OCMock/OCMock.h"
|
| +#include "third_party/ocmock/gtest_support.h"
|
| +
|
| +#if !defined(__has_feature) || !__has_feature(objc_arc)
|
| +#error "This file requires ARC support."
|
| +#endif
|
| +
|
| +TEST(ContentSuggestionsImageUpdaterTest, receivedImage) {
|
| + // Setup.
|
| + UIImage* image = [[UIImage alloc] init];
|
| + id delegateMock =
|
| + OCMProtocolMock(@protocol(ContentSuggestionsImageUpdaterDelegate));
|
| + ContentSuggestionsImageUpdater* imageUpdater =
|
| + [[ContentSuggestionsImageUpdater alloc] init];
|
| + imageUpdater.delegate = delegateMock;
|
| +
|
| + // Action.
|
| + [imageUpdater receivedImage:image];
|
| +
|
| + // Test.
|
| + EXPECT_OCMOCK_VERIFY(delegateMock);
|
| +}
|
|
|