Skip to content

Commit

Permalink
Merge pull request #45 in MOBILE-SDK/app_mobile-sdk-ios from MS-2664-…
Browse files Browse the repository at this point in the history
…Unit-Test-Fixes to master

* commit '4c4d1eb0e0586c8b466804c6de13fef44134d9c7':
  MS-2664 Use acdn.adnxs.com/mobile endpoint for unit test assets
  • Loading branch information
Jose Cabal-Ugaz committed Aug 29, 2016
2 parents 26e5308 + 4c4d1eb commit 6181955
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 57 deletions.
33 changes: 17 additions & 16 deletions tests/MediationAdapterAppTests/MediationAdaptersTestCase.m
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,23 @@ - (void)testMillennialSuccessfulBanner {
}

- (void)testiAdSuccessfulBanner {
ANBannerAdView *bannerAdView = [self.rootViewController loadiAdBannerWithDelegate:self];
[self.rootViewController.view addSubview:bannerAdView];

self.adResponseExpectation = [self expectationWithDescription:@"ad received/failed response"];
[self waitForExpectationsWithTimeout:kAppNexusRequestTimeoutInterval handler:nil];
XCTAssertFalse(self.didFailToReceiveAd, @"Received successful callback, but no ad was received.");

#if kANMediationAdaptersUITesting
bannerAdView.accessibilityLabel = @"banner";
[tester tapViewWithAccessibilityLabel:@"banner"];
[tester waitForTimeInterval:3.0];
XCTAssertTrue(self.adWasClicked, @"expected adWasClicked callback");
XCTAssertTrue(self.adWillPresent, @"expected adWillPresent callback");
XCTAssertTrue(self.adDidPresent, @"expected adDidPresent callback");
[tester waitForTimeInterval:3.0];
#endif
// iAd App Network shut down as of July 1, 2016
// ANBannerAdView *bannerAdView = [self.rootViewController loadiAdBannerWithDelegate:self];
// [self.rootViewController.view addSubview:bannerAdView];
//
// self.adResponseExpectation = [self expectationWithDescription:@"ad received/failed response"];
// [self waitForExpectationsWithTimeout:kAppNexusRequestTimeoutInterval handler:nil];
// XCTAssertFalse(self.didFailToReceiveAd, @"Received successful callback, but no ad was received.");
//
//#if kANMediationAdaptersUITesting
// bannerAdView.accessibilityLabel = @"banner";
// [tester tapViewWithAccessibilityLabel:@"banner"];
// [tester waitForTimeInterval:3.0];
// XCTAssertTrue(self.adWasClicked, @"expected adWasClicked callback");
// XCTAssertTrue(self.adWillPresent, @"expected adWillPresent callback");
// XCTAssertTrue(self.adDidPresent, @"expected adDidPresent callback");
// [tester waitForTimeInterval:3.0];
//#endif
}

- (void)testFacebookSuccessfulBanner {
Expand Down
4 changes: 2 additions & 2 deletions tests/NativeUnitTests/ANNativeAdResponseTestCase.m
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ - (void)testAppNexusWithMultipleMainMedia {
[self iconImageShouldBePresentInResponse:YES];
[self mainImageShouldBePresentInResponse:YES];

XCTAssertTrue([self.adResponse.mainImageURL.absoluteString containsString:@"rlissack.adnxs.net"]);
XCTAssertTrue([self.adResponse.mainImageURL.absoluteString containsString:@"acdn.adnxs.com/mobile"]);

[self createMainImageNativeView];
[self populateNativeViewWithResponse];
Expand Down Expand Up @@ -246,7 +246,7 @@ - (void)testAppNexusWithMultipleMainMediaDefault {
[self iconImageShouldBePresentInResponse:YES];
[self mainImageShouldBePresentInResponse:YES];

XCTAssertTrue([self.adResponse.mainImageURL.absoluteString containsString:@"rlissack.adnxs.net"]);
XCTAssertTrue([self.adResponse.mainImageURL.absoluteString containsString:@"acdn.adnxs.com/mobile"]);

[self createMainImageNativeView];
[self populateNativeViewWithResponse];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ - (void)testSimulateOffline {
name:kANHTTPStubURLProtocolRequestDidLoadNotification
object:nil];
[ANReachability toggleNonReachableNetworkStatusSimulationEnabled:YES];
self.URL = [NSURL URLWithString:@"http://rlissack.adnxs.net:8080/jtest/native/empty_response.json"];
self.URL = [NSURL URLWithString:@"https://acdn.adnxs.com/mobile/native_test/empty_response.json"];
[ANNativeImpressionTrackerManager fireImpressionTrackerURL:self.URL];
[XCTestCase delayForTimeInterval:3.0];
XCTAssertFalse(self.urlWasFired);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"title":"AppNexusSDKApp",
"description":"Showcases the AppNexus mobile SDK and all its features. Works with placements generated under a publisher in the AppNexus Console.",
"cta":"Install Now!",
"icon_img_url":"http://rlissack.adnxs.net:8080/jtest/appnexus_logo_icon@2x.png",
"icon_img_url":"https://acdn.adnxs.com/mobile/native_test/icon_image_100_100.png",
"main_media":[
{
"url":"http://rlissack.adnxs.net:8080/jtest/MainImageAppNexusSDKApp@2x.png",
"url":"https://acdn.adnxs.com/mobile/native_test/main_image_640_334.png",
"width":300,
"height":250,
"label":"default"
Expand All @@ -25,7 +25,7 @@
"scale":5
},
"impression_trackers":[
"http://rlissack.adnxs.net:8080/jtest/trackImpression"
"https://acdn.adnxs.com/mobile/native_test/trackImpression"
],
"click_trackers":[
"http://nym1.ib.adnxs.com/click?AAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA_AAAAAAAAAAAAAAAAAAAAAJkJvjGlBMFaZyDVla9jmxLH_n1UAAAAAJ-nIAC-AwAAvgMAAAIAAACL37AAtZgCAAAAAQBVU0QAVVNEACwB-gARIAAA5uUAAgMCAQIAAAAAJBbkOAAAAAA./cnd=%21-gXbOAi9vKkBEIu_wwUYtbEKIAQ./referrer=http%3A%2F%2Fapps.mobile.adnxs.com/clickenc="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"title":"AppNexusSDKApp",
"description":"Showcases the AppNexus mobile SDK and all its features. Works with placements generated under a publisher in the AppNexus Console.",
"cta":"Install Now!",
"icon_img_url":"http://rlissack.adnxs.net:8080/jtest/appnexus_logo_icon@2x.png",
"icon_img_url":"https://acdn.adnxs.com/mobile/native_test/icon_image_100_100.png",
"main_media":[
{
"url":"http://upload.wikimedia.org/wikipedia/commons/0/0a/Eastern_Grey_Squirrel.jpg",
Expand All @@ -20,7 +20,7 @@
"label":"banner"
},
{
"url":"http://rlissack.adnxs.net:8080/jtest/MainImageAppNexusSDKApp@2x.png",
"url":"https://acdn.adnxs.com/mobile/native_test/main_image_640_334.png",
"width":300,
"height":250,
"label":"default"
Expand All @@ -37,7 +37,7 @@
"scale":5
},
"impression_trackers":[
"http://rlissack.adnxs.net:8080/jtest/trackImpression"
"https://acdn.adnxs.com/mobile/native_test/trackImpression"
],
"click_trackers":[
"http://nym1.ib.adnxs.com/click?AAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA_AAAAAAAAAAAAAAAAAAAAAJkJvjGlBMFaZyDVla9jmxLH_n1UAAAAAJ-nIAC-AwAAvgMAAAIAAACL37AAtZgCAAAAAQBVU0QAVVNEACwB-gARIAAA5uUAAgMCAQIAAAAAJBbkOAAAAAA./cnd=%21-gXbOAi9vKkBEIu_wwUYtbEKIAQ./referrer=http%3A%2F%2Fapps.mobile.adnxs.com/clickenc="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"title":"AppNexusSDKApp",
"description":"Showcases the AppNexus mobile SDK and all its features. Works with placements generated under a publisher in the AppNexus Console.",
"cta":"Install Now!",
"icon_img_url":"http://rlissack.adnxs.net:8080/jtest/appnexus_logo_icon@2x.png",
"icon_img_url":"https://acdn.adnxs.com/mobile/native_test/icon_image_100_100.png",
"main_media":[
{
"url":"http://upload.wikimedia.org/wikipedia/commons/0/0a/Eastern_Grey_Squirrel.jpg",
Expand All @@ -20,7 +20,7 @@
"label":"banner"
},
{
"url":"http://rlissack.adnxs.net:8080/jtest/MainImageAppNexusSDKApp@2x.png",
"url":"https://acdn.adnxs.com/mobile/native_test/main_image_640_334.png",
"width":300,
"height":250,
"label":"default"
Expand All @@ -37,7 +37,7 @@
"scale":5
},
"impression_trackers":[
"http://rlissack.adnxs.net:8080/jtest/trackImpression"
"https://acdn.adnxs.com/mobile/native_test/trackImpression"
],
"click_trackers":[
"http://nym1.ib.adnxs.com/click?AAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA_AAAAAAAAAAAAAAAAAAAAAJkJvjGlBMFaZyDVla9jmxLH_n1UAAAAAJ-nIAC-AwAAvgMAAAIAAACL37AAtZgCAAAAAQBVU0QAVVNEACwB-gARIAAA5uUAAgMCAQIAAAAAJBbkOAAAAAA./cnd=%21-gXbOAi9vKkBEIu_wwUYtbEKIAQ./referrer=http%3A%2F%2Fapps.mobile.adnxs.com/clickenc="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"title":"AppNexusSDKApp",
"description":"Showcases the AppNexus mobile SDK and all its features. Works with placements generated under a publisher in the AppNexus Console.",
"cta":"Install Now!",
"icon_img_url":"http://rlissack.adnxs.net:8080/jtest/appnexus_logo_icon@2x.png",
"icon_img_url":"https://acdn.adnxs.com/mobile/native_test/icon_image_100_100.png",
"main_media":[
{
"url":"http://rlissack.adnxs.net:8080/jtest/MainImageAppNexusSDKApp@2x.png",
"url":"https://acdn.adnxs.com/mobile/native_test/main_image_640_334.png",
"width":300,
"height":250,
"label":"default"
Expand All @@ -25,15 +25,15 @@
"scale":5
},
"impression_trackers":[
"http://rlissack.adnxs.net:8080/jtest/trackImpression",
"http://rlissack.adnxs.net:8080/jtest/trackImpression2",
"http://rlissack.adnxs.net:8080/jtest/trackImpression3",
"https://acdn.adnxs.com/mobile/native_test/trackImpression",
"https://acdn.adnxs.com/mobile/native_test/trackImpression2",
"https://acdn.adnxs.com/mobile/native_test/trackImpression3",
],
"click_trackers":[
"http://nym1.ib.adnxs.com/click?AAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA_AAAAAAAAAAAAAAAAAAAAAJkJvjGlBMFaZyDVla9jmxLH_n1UAAAAAJ-nIAC-AwAAvgMAAAIAAACL37AAtZgCAAAAAQBVU0QAVVNEACwB-gARIAAA5uUAAgMCAQIAAAAAJBbkOAAAAAA./cnd=%21-gXbOAi9vKkBEIu_wwUYtbEKIAQ./referrer=http%3A%2F%2Fapps.mobile.adnxs.com/clickenc=",
"http://rlissack.adnxs.net:8080/jtest/trackClick",
"http://rlissack.adnxs.net:8080/jtest/trackClick2",
"http://rlissack.adnxs.net:8080/jtest/trackClick3"
"https://acdn.adnxs.com/mobile/native_test/trackClick",
"https://acdn.adnxs.com/mobile/native_test/trackClick2",
"https://acdn.adnxs.com/mobile/native_test/trackClick3"
],
"click_url":"http://appnexus.com"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"title":"AppNexusSDKApp",
"description":"Showcases the AppNexus mobile SDK and all its features. Works with placements generated under a publisher in the AppNexus Console.",
"cta":"Install Now!",
"icon_img_url":"http://rlissack.adnxs.net:8080/jtest/appnexus_logo_icon@2x.png",
"icon_img_url":"https://acdn.adnxs.com/mobile/native_test/icon_image_100_100.png",
"main_media":[
{
"url":"http://rlissack.adnxs.net:8080/jtest/MainImageAppNexusSDKApp@2x.png",
"url":"https://acdn.adnxs.com/mobile/native_test/main_image_640_334.png",
"width":300,
"height":250,
"label":"default"
Expand All @@ -25,7 +25,7 @@
"scale":5
},
"impression_trackers":[
"http://rlissack.adnxs.net:8080/jtest/trackImpression"
"https://acdn.adnxs.com/mobile/native_test/trackImpression"
],
"click_trackers":[
"http://nym1.ib.adnxs.com/click?AAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA_AAAAAAAAAAAAAAAAAAAAAJkJvjGlBMFaZyDVla9jmxLH_n1UAAAAAJ-nIAC-AwAAvgMAAAIAAACL37AAtZgCAAAAAQBVU0QAVVNEACwB-gARIAAA5uUAAgMCAQIAAAAAJBbkOAAAAAA./cnd=%21-gXbOAi9vKkBEIu_wwUYtbEKIAQ./referrer=http%3A%2F%2Fapps.mobile.adnxs.com/clickenc="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"title":"AppNexusSDKApp",
"description":"Showcases the AppNexus mobile SDK and all its features. Works with placements generated under a publisher in the AppNexus Console.",
"cta":"Install Now!",
"icon_img_url":"http://rlissack.adnxs.net:8080/jtest/appnexus_logo_icon@2x.png",
"icon_img_url":"https://acdn.adnxs.com/mobile/native_test/icon_image_100_100.png",
"main_media":[
{
"url":"http://rlissack.adnxs.net:8080/jtest/MainImageAppNexusSDKApp@2x.png",
"url":"https://acdn.adnxs.com/mobile/native_test/main_image_640_334.png",
"width":300,
"height":250,
"label":"default"
Expand All @@ -25,7 +25,7 @@
"scale":5
},
"impression_trackers":[
"http://rlissack.adnxs.net:8080/jtest/trackImpression"
"https://acdn.adnxs.com/mobile/native_test/trackImpression"
],
"click_trackers":[
"http://nym1.ib.adnxs.com/click?AAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA_AAAAAAAAAAAAAAAAAAAAAJkJvjGlBMFaZyDVla9jmxLH_n1UAAAAAJ-nIAC-AwAAvgMAAAIAAACL37AAtZgCAAAAAQBVU0QAVVNEACwB-gARIAAA5uUAAgMCAQIAAAAAJBbkOAAAAAA./cnd=%21-gXbOAi9vKkBEIu_wwUYtbEKIAQ./referrer=http%3A%2F%2Fapps.mobile.adnxs.com/clickenc="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"title":"AppNexusSDKApp",
"description":"Showcases the AppNexus mobile SDK and all its features. Works with placements generated under a publisher in the AppNexus Console.",
"cta":"Install Now!",
"icon_img_url":"http://rlissack.adnxs.net:8080/jtest/appnexus_logo_icon@2x.png",
"icon_img_url":"https://acdn.adnxs.com/mobile/native_test/icon_image_100_100.png",
"main_media":[
{
"url":"http://rlissack.adnxs.net:8080/jtest/MainImageAppNexusSDKApp@2x.png",
"url":"https://acdn.adnxs.com/mobile/native_test/main_image_640_334.png",
"width":300,
"height":250,
"label":"default"
Expand All @@ -22,7 +22,7 @@
"scale":5
},
"impression_trackers":[
"http://rlissack.adnxs.net:8080/jtest/trackImpression"
"https://acdn.adnxs.com/mobile/native_test/trackImpression"
],
"click_trackers":[
"http://nym1.ib.adnxs.com/click?AAAAAAAAAAAAAAAAAAAAAAAAAAAAAPA_AAAAAAAAAAAAAAAAAAAAAJkJvjGlBMFaZyDVla9jmxLH_n1UAAAAAJ-nIAC-AwAAvgMAAAIAAACL37AAtZgCAAAAAQBVU0QAVVNEACwB-gARIAAA5uUAAgMCAQIAAAAAJBbkOAAAAAA./cnd=%21-gXbOAi9vKkBEIu_wwUYtbEKIAQ./referrer=http%3A%2F%2Fapps.mobile.adnxs.com/clickenc="
Expand All @@ -49,7 +49,7 @@
}
],
"init_cb":"",
"result_cb":"http://rlissack.adnxs.net:8080/jtest/native/empty_mediated_ad_response.json"
"result_cb":"https://acdn.adnxs.com/mobile/native_test/empty_mediated_ad_response.json"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
],
"init_cb":"",
"result_cb":"http://rlissack.adnxs.net:8080/jtest/native/appnexus_standard_response.json"
"result_cb":"https://acdn.adnxs.com/mobile/native_test/appnexus_standard_response.json"
}
]
}
4 changes: 2 additions & 2 deletions tests/NativeUnitTests/Native Responses/nativeResponse1.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"title":"AppNexusSDKApp",
"description":"Showcases the AppNexus mobile SDK and all its features. Works with placements generated under a publisher in the AppNexus Console.",
"cta":"Install Now!",
"icon_img_url":"http://rlissack.adnxs.net:8080/jtest/appnexus_logo_icon@2x.png",
"icon_img_url":"https://acdn.adnxs.com/mobile/native_test/icon_image_100_100.png",
"main_media":[
{
"url":"http://rlissack.adnxs.net:8080/jtest/MainImageAppNexusSDKApp@2x.png",
"url":"https://acdn.adnxs.com/mobile/native_test/main_image_640_334.png",
"width":300,
"height":250,
"label":"default"
Expand Down
4 changes: 2 additions & 2 deletions tests/NativeUnitTests/Native Responses/nativeResponse2.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"title":"AppNexusSDKApp",
"description":"Showcases the AppNexus mobile SDK and all its features. Works with placements generated under a publisher in the AppNexus Console.",
"cta":"Install Now!",
"icon_img_url":"http://rlissack.adnxs.net:8080/jtest/appnexus_logo_icon@2x.png",
"icon_img_url":"https://acdn.adnxs.com/mobile/native_test/icon_image_100_100.png",
"main_media":[
{
"url":"http://rlissack.adnxs.net:8080/jtest/MainImageAppNexusSDKApp@2x.png",
"url":"https://acdn.adnxs.com/mobile/native_test/main_image_640_334.png",
"width":300,
"height":250,
"label":"default"
Expand Down
4 changes: 2 additions & 2 deletions tests/NativeUnitTests/Native Responses/nativeResponse3.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"title":"AppNexusSDKApp",
"description":"Showcases the AppNexus mobile SDK and all its features. Works with placements generated under a publisher in the AppNexus Console.",
"cta":"Install Now!",
"icon_img_url":http://rlissack.adnxs.net:8080/jtest/appnexus_logo_icon@2x.png",
"icon_img_url":https://acdn.adnxs.com/mobile/native_test/icon_image_100_100.png",
"main_media":[
{
"url":"http://rlissack.adnxs.net:8080/jtest/MainImageAppNexusSDKApp@2x.png",
"url":"https://acdn.adnxs.com/mobile/native_test/main_image_640_334.png",
"width":300,
"height":250,
"label":"default"
Expand Down
4 changes: 2 additions & 2 deletions tests/NativeUnitTests/Native Responses/nativeResponse4.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"title":"AppNexusSDKApp",
"description":"Showcases the AppNexus mobile SDK and all its features. Works with placements generated under a publisher in the AppNexus Console.",
"cta":"Install Now!",
"icon_img_url":"http://rlissack.adnxs.net:8080/jtest/appnexus_logo_icon@2x.png",
"icon_img_url":"https://acdn.adnxs.com/mobile/native_test/icon_image_100_100.png",
"main_media":[
{
"url":"http://rlissack.adnxs.net:8080/jtest/MainImageAppNexusSDKApp@2x.png",
"url":"https://acdn.adnxs.com/mobile/native_test/main_image_640_334.png",
"width":300,
"height":250,
"label":"default"
Expand Down
4 changes: 2 additions & 2 deletions tests/NativeUnitTests/Native Responses/nativeResponse5.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"title":"AppNexusSDKApp",
"description":"Showcases the AppNexus mobile SDK and all its features. Works with placements generated under a publisher in the AppNexus Console.",
"cta":"Install Now!",
"icon_img_url":"http://rlissack.adnxs.net:8080/jtest/appnexus_logo_icon@2x.png",
"icon_img_url":"https://acdn.adnxs.com/mobile/native_test/icon_image_100_100.png",
"main_media":[
{
"url":"http://rlissack.adnxs.net:8080/jtest/MainImageAppNexusSDKApp@2x.png",
"url":"https://acdn.adnxs.com/mobile/native_test/main_image_640_334.png",
"width":300,
"height":250,
"label":"default"
Expand Down

0 comments on commit 6181955

Please sign in to comment.