diff --git a/UnitTests/MPURLRequestBuilderTests.m b/UnitTests/MPURLRequestBuilderTests.m index fe5db4a1..4275a1c9 100644 --- a/UnitTests/MPURLRequestBuilderTests.m +++ b/UnitTests/MPURLRequestBuilderTests.m @@ -1,5 +1,6 @@ #import #import +#import "mParticle.h" #import "MPURLRequestBuilder.h" #import "MPStateMachine.h" #import "MPIConstants.h" @@ -14,18 +15,18 @@ #import "MPMessage.h" #import "MPBaseTestCase.h" #import "MPKitConfiguration.h" -#import "MParticleWebView.h" #import "MPExtensionProtocol.h" #import "MPURL.h" #import "MPUpload.h" -#import "mParticle.h" +#import "MParticleSwift.h" + @interface MParticle () + (dispatch_queue_t)messageQueue; @property (nonatomic, strong) MPStateMachine_PRIVATE *stateMachine; @property (nonatomic, strong) MPKitContainer_PRIVATE *kitContainer_PRIVATE; -@property (nonatomic, strong) MParticleWebView *webView; +@property (nonatomic, strong) MParticleWebView_PRIVATE *webView; @end @@ -370,7 +371,7 @@ - (void)testInvalidURLs { - (void)testEventRequest { MParticle *sharedInstance = [MParticle sharedInstance]; - MParticleWebView *webview = sharedInstance.webView; + MParticleWebView_PRIVATE *webview = sharedInstance.webView; NSString *agent = @"Example resolved agent"; id mockWebView = OCMPartialMock(webview); diff --git a/UnitTests/MParticleTests.m b/UnitTests/MParticleTests.m index 7b85ddf6..6a15fb74 100644 --- a/UnitTests/MParticleTests.m +++ b/UnitTests/MParticleTests.m @@ -6,7 +6,6 @@ #import "MPSession.h" #import "MPBackendController.h" #import "MPURLRequestBuilder.h" -#import "MParticleWebView.h" #import "MPPersistenceController.h" #import "MPIUserDefaults.h" #import "MPURL.h" @@ -26,7 +25,7 @@ + (dispatch_queue_t)messageQueue; @property (nonatomic, strong) MParticleOptions *options; - (BOOL)isValidBridgeName:(NSString *)bridgeName; - (void)handleWebviewCommand:(NSString *)command dictionary:(NSDictionary *)dictionary; -@property (nonatomic, strong) MParticleWebView *webView; +@property (nonatomic, strong) MParticleWebView_PRIVATE *webView; @end @interface MParticleUser () @@ -980,7 +979,7 @@ - (void)testSetATTStatusRemoveIDFA { } - (void)testUserAgentDefault { - id mockWebView = OCMClassMock([MParticleWebView class]); + id mockWebView = OCMClassMock([MParticleWebView_PRIVATE class]); #if TARGET_OS_IOS == 1 [[[mockWebView stub] andReturn:@"Example resolved agent"] userAgent]; #else @@ -1003,7 +1002,7 @@ - (void)testUserAgentDefault { - (void)testUserAgentCustom { NSString *customAgent = @"Foo 1.2.3 Like Bar"; - id mockWebView = OCMClassMock([MParticleWebView class]); + id mockWebView = OCMClassMock([MParticleWebView_PRIVATE class]); [[[mockWebView stub] andReturn:customAgent] userAgent]; id mockMParticle = OCMPartialMock([MParticle sharedInstance]); [[[mockMParticle stub] andReturn:mockWebView] webView];