| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_image_upd
ater.h" |
| 6 |
| 7 #import <UIKit/UIKit.h> |
| 8 |
| 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #import "third_party/ocmock/OCMock/OCMock.h" |
| 11 #include "third_party/ocmock/gtest_support.h" |
| 12 |
| 13 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 14 #error "This file requires ARC support." |
| 15 #endif |
| 16 |
| 17 TEST(ContentSuggestionsImageUpdaterTest, receivedImage) { |
| 18 // Setup. |
| 19 UIImage* image = [[UIImage alloc] init]; |
| 20 id delegateMock = |
| 21 OCMProtocolMock(@protocol(ContentSuggestionsImageUpdaterDelegate)); |
| 22 ContentSuggestionsImageUpdater* imageUpdater = |
| 23 [[ContentSuggestionsImageUpdater alloc] init]; |
| 24 imageUpdater.delegate = delegateMock; |
| 25 |
| 26 // Action. |
| 27 [imageUpdater receivedImage:image]; |
| 28 |
| 29 // Test. |
| 30 EXPECT_OCMOCK_VERIFY(delegateMock); |
| 31 } |
| OLD | NEW |