Skip to content

Commit

Permalink
Pull request #921: Fix TestCases for 8.9.0 release
Browse files Browse the repository at this point in the history
Merge in MOBILE-SDK/app_mobile-sdk-ios from Fix_TestCases to develop

Squashed commit of the following:

commit 1fe3c2cecd1892ba0939f2900140d9ea5c70ad8f
Author: ksubramanian <[email protected]>
Date:   Wed Oct 18 23:40:39 2023 -0400

    Fixed test case https

commit 5e58a48ef1ef53a5bab08c947f611d2646096524
Author: ksubramanian <[email protected]>
Date:   Wed Oct 18 21:22:41 2023 -0400

    Fix Test Cases
  • Loading branch information
Kowshickkarthick Subramanian committed Oct 19, 2023
1 parent 0c80698 commit f1de02b
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 51 deletions.
2 changes: 1 addition & 1 deletion sdk/AppNexusNativeSDK/SDK-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>8.8.0</string>
<string>8.8.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion sdk/AppNexusNativeStaticSDK/SDK-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>8.8.0</string>
<string>8.8.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion sdk/AppNexusSDK/SDK-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>8.8.0</string>
<string>8.8.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
90 changes: 45 additions & 45 deletions tests/UnitTestApp/FunctionalTests/ANOMIDNativeTestCase.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,51 +79,51 @@ - (void)testOMIDSessionIsNotNill {
XCTAssertNotNil(self.adResponseInfo.omidAdSession);
}

//- (void)testOMIDSDKValidation{
// [self stubRequestWithResponse:@"OMID_Native_RTBResponse"];
// [self.adRequest loadAd];
// [XCTestCase delayForTimeInterval:10];
// XCTAssertTrue([self.requestData containsString:@"OmidSupported"]);
// XCTAssertTrue([self.requestData containsString:@"true"]);
// XCTAssertTrue([self.requestData containsString:@"sessionStart"]);
// XCTAssertTrue([self.requestData containsString:@"partnerName"]);
// XCTAssertTrue([self.requestData containsString:@"Appnexus"]);
// XCTAssertTrue([self.requestData containsString:@"partnerVersion"]);
// XCTAssertTrue([self.requestData containsString:AN_SDK_VERSION]);
// XCTAssertTrue([self.requestData containsString:@"impression"]);
// XCTAssertTrue([self.requestData containsString:OMID_SDK_VERSION]);
// XCTAssertTrue([self.requestData containsString:@"libraryVersion"]);
//
//}

//- (void)testOMIDSessionFinish{
// [self stubRequestWithResponse:@"OMID_Native_RTBResponse"];
// [self.adRequest loadAd];
// [XCTestCase delayForTimeInterval:10];
//
// XCTAssertTrue([self.requestData containsString:@"OmidSupported"]);
// XCTAssertTrue([self.requestData containsString:@"true"]);
// XCTAssertTrue([self.requestData containsString:@"sessionStart"]);
// XCTAssertTrue([self.requestData containsString:@"partnerName"]);
// XCTAssertTrue([self.requestData containsString:@"Appnexus"]);
// XCTAssertTrue([self.requestData containsString:@"partnerVersion"]);
// XCTAssertTrue([self.requestData containsString:AN_SDK_VERSION]);
// XCTAssertTrue([self.requestData containsString:@"impression"]);
// XCTAssertTrue([self.requestData containsString:@"creativeType"]);
// XCTAssertTrue([self.requestData containsString:@"nativeDisplay"]);
// XCTAssertTrue([self.requestData containsString:@"impressionType"]);
// XCTAssertTrue([self.requestData containsString:@"viewable"]);
// XCTAssertTrue([self.requestData containsString:@"mediaType"]);
// XCTAssertTrue([self.requestData containsString:@"display"]);
// XCTAssertTrue([self.requestData containsString:@"impression"]);
// XCTAssertTrue([self.requestData containsString:OMID_SDK_VERSION]);
// XCTAssertTrue([self.requestData containsString:@"libraryVersion"]);
//
// [self.adResponseInfo unregisterViewFromTracking];
// [XCTestCase delayForTimeInterval:5];
// XCTAssertTrue([self.requestData containsString:@"sessionFinish"]);
// self.requestData = nil;
//}
- (void)testOMIDSDKValidation{
[self stubRequestWithResponse:@"OMID_Native_RTBResponse"];
[self.adRequest loadAd];
[XCTestCase delayForTimeInterval:10];
XCTAssertTrue([self.requestData containsString:@"OmidSupported"]);
XCTAssertTrue([self.requestData containsString:@"true"]);
XCTAssertTrue([self.requestData containsString:@"sessionStart"]);
XCTAssertTrue([self.requestData containsString:@"partnerName"]);
XCTAssertTrue([self.requestData containsString:@"Appnexus"]);
XCTAssertTrue([self.requestData containsString:@"partnerVersion"]);
XCTAssertTrue([self.requestData containsString:AN_SDK_VERSION]);
XCTAssertTrue([self.requestData containsString:@"impression"]);
XCTAssertTrue([self.requestData containsString:OMID_SDK_VERSION]);
XCTAssertTrue([self.requestData containsString:@"libraryVersion"]);

}

- (void)testOMIDSessionFinish{
[self stubRequestWithResponse:@"OMID_Native_RTBResponse"];
[self.adRequest loadAd];
[XCTestCase delayForTimeInterval:10];

XCTAssertTrue([self.requestData containsString:@"OmidSupported"]);
XCTAssertTrue([self.requestData containsString:@"true"]);
XCTAssertTrue([self.requestData containsString:@"sessionStart"]);
XCTAssertTrue([self.requestData containsString:@"partnerName"]);
XCTAssertTrue([self.requestData containsString:@"Appnexus"]);
XCTAssertTrue([self.requestData containsString:@"partnerVersion"]);
XCTAssertTrue([self.requestData containsString:AN_SDK_VERSION]);
XCTAssertTrue([self.requestData containsString:@"impression"]);
XCTAssertTrue([self.requestData containsString:@"creativeType"]);
XCTAssertTrue([self.requestData containsString:@"nativeDisplay"]);
XCTAssertTrue([self.requestData containsString:@"impressionType"]);
XCTAssertTrue([self.requestData containsString:@"viewable"]);
XCTAssertTrue([self.requestData containsString:@"mediaType"]);
XCTAssertTrue([self.requestData containsString:@"display"]);
XCTAssertTrue([self.requestData containsString:@"impression"]);
XCTAssertTrue([self.requestData containsString:OMID_SDK_VERSION]);
XCTAssertTrue([self.requestData containsString:@"libraryVersion"]);

[self.adResponseInfo unregisterViewFromTracking];
[XCTestCase delayForTimeInterval:5];
XCTAssertTrue([self.requestData containsString:@"sessionFinish"]);
self.requestData = nil;
}


#pragma mark - ANNativeAdRequestDelegate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ - (void)setUp {
// Put setup code here. This method is called before the invocation of each test method in the class.
[self clearAd];
// Init here if not the tests will crash

// Init here if not the tests will crash
[[XandrAd sharedInstance] initWithMemberID:1 preCacheRequestObjects:true completionHandler:nil];

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"brand_category_id": 25,
"client_initiated_ad_counting": true,
"viewability": {
"config": "<script type=\"text/javascript\" async=\"true\" src=\"http://cdn.adnxs.com/v/s/160/trk.js#v;vk=appnexus.com-omid;tv=native1-18h;dom_id=%native_dom_id%;st=2;d=1x1;vc=iab;vid_ccr=1;ab=10;cid=1;tag_id=15378891;cb=http%3A%2F%2Fsin1-mobile.adnxs.com%2Fvevent%3Freferrer%3Ditunes.apple.com%252Fus%252Fapp%252Fappnexus-sdk-app%252Fid736869833%26e%3DwqT_3QK9COg9BAAAAwDWAAUBCKLyreQFEOz37tjJhdrAQRiK9rXIxs6lnlIqNgn5wmSqYFSSPxH5wmSqYFSSPxkAAAkCACERGwApEQkAMQkZqAAAMMvTqgc4vgdAvgdIAlDuhJFHWKfIYGAAaJFAeOGjBYABAYoBA1VTRJIFBvA-mAEBoAEBqAEGsAEAuAEAwAEEyAEC0AEA2AEA4AEA8AEAigI7dWYoJ2EnLCA0NzQxODQsIDE1NTI2NDQzODYpBRw0cicsIDE0OTE3Njk0MiwyHwDwjZIC9QEhQmo3Q1pBajR3NmtORU82RWtVY1lBQ0NueUdBd0FEZ0FRQU5JdmdkUXk5T3FCMWdBWU9JSGFBQndJbmpvRjRBQkpvZ0I2QmVRQVFHWUFRR2dBUUdvQVFPd0FRQzVBY3U1TUxKVFZKSV93UUhMdVRDeVUxU1NQOGtCRlBiNjJzR2pfRF9aQVFBQUEBA1hQQV80QUVBOVFHWm9wSThtQUlBb0FMXwEBDEQ3VUMBIwhBTDAJCPBETUFDQU1nQ0FPQUNBT2dDQVBnQ0FJQURBWmdEQWFnRC1NT3BEYm9EQ1ZOSlRqRTZNelU0T2VBRDFnZy6aAmEhaWhDb19BNvgAqHA4aGdJQU1vQURGN0ZLNUg0WHFFUHpvSlUwbE9NVG96TlRnNVFOWUlTUUEFiwGwAFURDAxBQUFXHQyI2ALoB-ACx9MB6gI0aXR1bmVzLmFwcGxlLmNvbS91cy9hcHABBCRuZXh1cy1zZGstARFgaWQ3MzY4Njk4MzPyAhAKBkFEVl9JRBIGNCXdHPICEQoGQ1BHARM4Bzc1NDUxNzbyAhEKBUNQARNkCDI3OTQzNDE28gITCg9DVVNUT01fTU9ERUwBHhQA8gIaChYyFgAgTEVBRl9OQU1FAR0IHgoaNh0ACEFTVAE-8LdJRklFRBIAgAMBiAMBkAMAmAMXoAMBqgMAwAPgqAHIAwHSAygIABIkMmFiMGQ2YjAtZjU1Ni00ZjU0LWIzNjctZTRjMTkwNmUzODFm2AP5o3rgAwDoAwL4AwCABACSBAYvdXQvdjOYBACiBAsxMC4xNC4xMi4xNagE9-sBsgQOCAAQARgAIAAoADAAOAK4BADABADIBADSBA05NTgjU0lOMTozNTg52gQCCAHgBADwBO6EkUeCBQk3MUggiAUBmAUAoAX_EQEUAcAFAMkFaZEU8D_SBQkJCQx4AADYBQHgBQHwBdyKBfoFBAgAEACQBgGYBgC4BgDBBgklJPA_yAYA2gYWChAJEBkBGBAAGADgBgw.%26s%3D1441abda1cd0730bbd68495c6c276653804e2f28;ts=1552644386;cet=0;cecb=\"></script>"
"config": "<script type=\"text/javascript\" async=\"true\" src=\"https://cdn.adnxs.com/v/s/160/trk.js#v;vk=appnexus.com-omid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UwBHhQA8gIaChYyFgAgTEVBRl9OQU1FAR0IHgoaNh0ACEFTVAE-8LdJRklFRBIAgAMBiAMBkAMAmAMXoAMBqgMAwAPgqAHIAwHSAygIABIkMmFiMGQ2YjAtZjU1Ni00ZjU0LWIzNjctZTRjMTkwNmUzODFm2AP5o3rgAwDoAwL4AwCABACSBAYvdXQvdjOYBACiBAsxMC4xNC4xMi4xNagE9-sBsgQOCAAQARgAIAAoADAAOAK4BADABADIBADSBA05NTgjU0lOMTozNTg52gQCCAHgBADwBO6EkUeCBQk3MUggiAUBmAUAoAX_EQEUAcAFAMkFaZEU8D_SBQkJCQx4AADYBQHgBQHwBdyKBfoFBAgAEACQBgGYBgC4BgDBBgklJPA_yAYA2gYWChAJEBkBGBAAGADgBgw.%26s%3D1441abda1cd0730bbd68495c6c276653804e2f28;ts=1552644386;cet=0;cecb=\"></script>"
},
"csm": {
"timeout_ms": 500,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#import "ANBannerAdView+ANTest.h"

@interface ANBannerAdViewTransitionsFadeTestCase : XCTestCase
@property (nonatomic, weak) ANBannerAdView *bannerAdView;
@property (nonatomic) ANBannerAdView *bannerAdView;
@end

@implementation ANBannerAdViewTransitionsFadeTestCase
Expand Down

0 comments on commit f1de02b

Please sign in to comment.