diff --git a/UnitTests/SwiftTests/MParticle/MParticleBackendControllerDelegateTests.swift b/UnitTests/SwiftTests/MParticle/MParticleBackendControllerDelegateTests.swift index ce7d2399..1398a96d 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleBackendControllerDelegateTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleBackendControllerDelegateTests.swift @@ -14,7 +14,7 @@ import XCTest final class MParticleBackendControllerDelegateTests: MParticleTestBase { - func testForwardLogInstall() { + func test_forwardLogInstall_forwardsCall_onMainQueue() { mparticle.forwardLogInstall() XCTAssertEqual(executor.executeOnMainAsync, true) XCTAssertTrue(kitContainer.forwardSDKCallCalled) @@ -25,7 +25,7 @@ final class MParticleBackendControllerDelegateTests: MParticleTestBase { XCTAssertNil(kitContainer.forwardSDKCallUserInfoParam) } - func testForwardLogUpdate() { + func test_forwardLogUpdate_forwardsCall_onMainQueue() { mparticle.forwardLogUpdate() XCTAssertEqual(executor.executeOnMainAsync, true) XCTAssertTrue(kitContainer.forwardSDKCallCalled) diff --git a/UnitTests/SwiftTests/MParticle/MParticleBreadcrumbTests.swift b/UnitTests/SwiftTests/MParticle/MParticleBreadcrumbTests.swift index ea52c63b..46442d50 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleBreadcrumbTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleBreadcrumbTests.swift @@ -14,7 +14,7 @@ import XCTest final class MParticleBreadcrumbTests: MParticleTestBase { - func testLeaveBreadcrumbCallback_withDataFilterNotSet_forwardsTransformedEvent() { + func test_leaveBreadcrumbCallback_forwardsEvent_whenDataFilterIsNil() { mparticle.dataPlanFilter = nil XCTAssertNil(mparticle.dataPlanFilter) @@ -32,7 +32,7 @@ final class MParticleBreadcrumbTests: MParticleTestBase { assertReceivedMessage("Left breadcrumb", event: event) } - func testLeaveBreadcrumbCallback_withDataFilterSet_andDataFilterReturnNil() { + func test_leaveBreadcrumbCallback_blocksEvent_whenFilterReturnsNil() { mparticle.leaveBreadcrumbCallback(event, execStatus: .success) XCTAssertTrue(dataPlanFilter.transformEventCalled) @@ -41,18 +41,18 @@ final class MParticleBreadcrumbTests: MParticleTestBase { assertReceivedMessage("Blocked breadcrumb event from kits", event: event) } - func testLeaveBreadcrumbCallback_execStatusFail_noLoggedMessages() { + func test_leaveBreadcrumbCallback_doesNotLog_whenExecStatusFail() { mparticle.leaveBreadcrumbCallback(event, execStatus: .fail) XCTAssertNil(receivedMessage) } - func testLeaveBreadcrumb_eventNamePassed_backendControllerReceiveCorrectName() { + func test_leaveBreadcrumb_passesEventName_toBackendController() { mparticle.leaveBreadcrumb(event.name, eventInfo: event.customAttributes) XCTAssertEqual(backendController.eventWithNameEventNameParam, event.name) } - func testLeaveBreadcrumb_eventNamePassed_backendControllerReturnsNilEvent_newEventCreated() { + func test_leaveBreadcrumb_createsNewEvent_whenNoExistingEventFound() { mparticle.leaveBreadcrumb(event.name, eventInfo: event.customAttributes) XCTAssertEqual(backendController.leaveBreadcrumbEventParam?.name, event.name) XCTAssertEqual(backendController.leaveBreadcrumbEventParam?.type, .other) @@ -61,7 +61,7 @@ final class MParticleBreadcrumbTests: MParticleTestBase { XCTAssertNotNil(backendController.leaveBreadcrumbCompletionHandler) } - func testLeaveBreadcrumb_eventNamePassed_backendControllerReturnsEvent_eventModified() { + func test_leaveBreadcrumb_updatesExistingEvent_whenEventAlreadyExists() { backendController.eventSet?.add(event as Any) mparticle.leaveBreadcrumb(event.name, eventInfo: event.customAttributes) XCTAssertEqual(backendController.leaveBreadcrumbEventParam?.name, event.name) @@ -71,7 +71,7 @@ final class MParticleBreadcrumbTests: MParticleTestBase { XCTAssertNotNil(backendController.leaveBreadcrumbCompletionHandler) } - func testLeaveBreadcrumb_eventNamePassed_CallbackCallsCallbackFunction() { + func test_leaveBreadcrumb_invokesCallback_andLogsMessage() { mparticle.dataPlanFilter = nil mparticle.leaveBreadcrumb(event.name, eventInfo: event.customAttributes) backendController.leaveBreadcrumbCompletionHandler?(event, .success) diff --git a/UnitTests/SwiftTests/MParticle/MParticleCommerceEventTests.swift b/UnitTests/SwiftTests/MParticle/MParticleCommerceEventTests.swift index 382bc744..8ce87e27 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleCommerceEventTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleCommerceEventTests.swift @@ -12,9 +12,10 @@ import XCTest import mParticle_Apple_SDK #endif +@available(*, deprecated, message: "Used only for testing deprecated APIs") final class MParticleCommerceEventTests: MParticleTestBase { - func testLogCommerceEvent_assignsTimestampWhenNil() { + func test_logCommerceEvent_assignsTimestampIfMissing() { commerceEvent.setTimestamp(nil) mparticle.logCommerceEvent(commerceEvent) @@ -25,7 +26,7 @@ final class MParticleCommerceEventTests: MParticleTestBase { XCTAssertTrue(executor.executeOnMessageQueueAsync) } - func testLogCommerceEventWithFilterReturningNil_blocksEvent() { + func test_logCommerceEvent_blocksEvent_whenFilterReturnsNil() { dataPlanFilter.transformEventForCommerceEventParam = nil mparticle.logCommerceEvent(commerceEvent) @@ -55,7 +56,7 @@ final class MParticleCommerceEventTests: MParticleTestBase { assertReceivedMessage("Blocked commerce event from kits", event: commerceEvent) } - func testLogCommerceEventWithFilterReturningEvent_forwardsTransformedEvent() { + func test_logCommerceEvent_forwardsTransformedEvent_whenFilterReturnsEvent() { dataPlanFilter.transformEventForCommerceEventReturnValue = transformedCommerceEvent mparticle.logCommerceEvent(commerceEvent) @@ -86,13 +87,13 @@ final class MParticleCommerceEventTests: MParticleTestBase { XCTAssertTrue(kitContainer.forwardCommerceEventCallCommerceEventParam === transformedCommerceEvent) } - func testLogCommerceEventCallbackSuccess() { + func test_logCommerceEventCallback_doesNotLogMessage_onSuccess() { mparticle.logCommerceEventCallback(commerceEvent, execStatus: .success) XCTAssertNil(receivedMessage) } - func testLogCommerceEventCallbackFail() { + func test_logCommerceEventCallback_logsError_onFailure() { mparticle.logCommerceEventCallback(commerceEvent, execStatus: .fail) assertReceivedMessage("Failed to log commerce event", event: commerceEvent) diff --git a/UnitTests/SwiftTests/MParticle/MParticleConfigurationTests.swift b/UnitTests/SwiftTests/MParticle/MParticleConfigurationTests.swift index 7c0ac760..67583d4d 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleConfigurationTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleConfigurationTests.swift @@ -14,7 +14,7 @@ import XCTest final class MParticleConfigurationTests: MParticleTestBase { - func testStartWithKeyCallbackFirstRun() { + func test_start_initializesAndSetsFirstRunValues_whenFirstRun() { XCTAssertFalse(mparticle.initialized) mparticle.start(withKeyCallback: true, options: options, userDefaults: userDefaults) @@ -28,7 +28,7 @@ final class MParticleConfigurationTests: MParticleTestBase { XCTAssertTrue(userDefaults.synchronizeCalled) } - func testStartWithKeyCallbackNotFirstRunWithIdentityRequest() { + func test_start_initializesWithoutUpdatingUserDefaults_whenNotFirstRun() { let user = mparticle.identity.currentUser options.identifyRequest = MPIdentityApiRequest(user: user!) @@ -41,7 +41,7 @@ final class MParticleConfigurationTests: MParticleTestBase { XCTAssertFalse(userDefaults.synchronizeCalled) } - func testConfigureDefaultConfigurationExistOptionParametersAreNotSet() { + func test_configure_usesDefaultValues_whenNoSettingsExist() { mparticle.backendController = MPBackendController_PRIVATE() mparticle.configure(with: options) XCTAssertEqual(mparticle.backendController.sessionTimeout, 0.0) @@ -51,7 +51,7 @@ final class MParticleConfigurationTests: MParticleTestBase { XCTAssertEqual(mparticle.trackNotifications, true) } - func testConfigureWhenDefaultConfigurationExists() { + func test_configure_appliesSettings_whenConfigSettingsExist() { let settings: NSMutableDictionary = [ "session_timeout": NSNumber(value: 2.0), "upload_interval": NSNumber(value: 3.0), @@ -74,7 +74,7 @@ final class MParticleConfigurationTests: MParticleTestBase { XCTAssertEqual(mparticle.trackNotifications, false) } - func testConfigureWithOptionsNoSettings() { + func test_configure_usesFallbackValues_whenOptionsAndSettingsAreEmpty() { mparticle.configure(with: .init()) XCTAssertEqual(backendController.sessionTimeout, 0.0) XCTAssertEqual(backendController.uploadInterval, 0.0) @@ -88,7 +88,7 @@ final class MParticleConfigurationTests: MParticleTestBase { #endif } - func testConfigureWithOptionsWithSettingsAndOptionNotSet() { + func test_configure_appliesStoredSettings_whenOptionsNotSet() { settingsProvider.configSettings = [ "session_timeout": 100, "upload_interval": 50, @@ -117,7 +117,7 @@ final class MParticleConfigurationTests: MParticleTestBase { #endif } - func testResetForSwitchingWorkspaces() { + func test_reset_clearsState_andFlushesKits() { let expectation = XCTestExpectation() mparticle.reset { diff --git a/UnitTests/SwiftTests/MParticle/MParticleCustomEventTests.swift b/UnitTests/SwiftTests/MParticle/MParticleCustomEventTests.swift index e82f3d99..696cd3e6 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleCustomEventTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleCustomEventTests.swift @@ -14,12 +14,12 @@ import XCTest final class MParticleCustomEventTests: MParticleTestBase { - func testLogCustomEventWithNilEvent_logsError() { + func test_logCustomEvent_logsError_whenEventIsNil() { mparticle.logCustomEvent(nil) assertReceivedMessage("Cannot log nil event!") } - func testLogCustomEventWithFilterReturningNil_blocksEvent() { + func test_logCustomEvent_blocksEvent_whenFilterReturnsNil() { dataPlanFilter.transformEventReturnValue = nil mparticle.logCustomEvent(event) @@ -47,7 +47,7 @@ final class MParticleCustomEventTests: MParticleTestBase { assertReceivedMessage("Blocked custom event from kits", event: event) } - func testLogCustomEventWithFilterReturningEvent_forwardsTransformedEvent() { + func test_logCustomEvent_forwardsTransformedEvent_whenFilterReturnsEvent() { dataPlanFilter.transformEventReturnValue = transformedEvent mparticle.logCustomEvent(event) diff --git a/UnitTests/SwiftTests/MParticle/MParticleErrorTests.swift b/UnitTests/SwiftTests/MParticle/MParticleErrorTests.swift index 95c40b73..8b52ff84 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleErrorTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleErrorTests.swift @@ -14,42 +14,42 @@ import XCTest final class MParticleErrorTests: MParticleTestBase { - func testLogErrorCallbackSuccess() { + func test_logErrorCallback_logsMessage_whenSuccess() { mparticle.logErrorCallback([:], execStatus: .success, message: "error") assertReceivedMessage("Logged error with message: error") } - func testLogErrorCallbackFail() { + func test_logErrorCallback_doesNotLog_whenFail() { mparticle.logErrorCallback([:], execStatus: .fail, message: "error") XCTAssertNil(receivedMessage) } - func testLogExceptionCallbackSuccess() { + func test_logExceptionCallback_logsDetails_whenSuccess() { mparticle.logExceptionCallback(exception, execStatus: .success, message: "exception", topmostContext: nil) assertReceivedMessage("Logged exception name: exception, reason: Test, topmost context: (null)") } - func testLogExceptionCallbackFail() { + func test_logExceptionCallback_doesNotLog_whenFail() { mparticle.logExceptionCallback(exception, execStatus: .fail, message: "exception", topmostContext: nil) XCTAssertNil(receivedMessage) } - func testLogCrashCallbackSuccess() { + func test_logCrashCallback_logsMessage_whenSuccess() { mparticle.logCrashCallback(.success, message: "Message") assertReceivedMessage("Logged crash with message: Message") } - func testLogNetworkPerformanceCallbackSuccess() { + func test_logNetworkPerformanceCallback_logsMessage_whenSuccess() { mparticle.logNetworkPerformanceCallback(.success) assertReceivedMessage("Logged network performance measurement") } - func testLogNetworkPerformanceCallbackFail() { + func test_logNetworkPerformanceCallback_doesNotLog_whenFail() { mparticle.logNetworkPerformanceCallback(.fail) XCTAssertNil(receivedMessage) diff --git a/UnitTests/SwiftTests/MParticle/MParticleEventTests.swift b/UnitTests/SwiftTests/MParticle/MParticleEventTests.swift index 14fc7d24..7eef60f7 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleEventTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleEventTests.swift @@ -14,19 +14,19 @@ import XCTest final class MParticleEventTests: MParticleTestBase { - func testLogEventCalledLogCustomEvent() { + func test_logEvent_callsLogCustomEvent() { mparticle.logEvent(event) wait(for: [listenerController.onAPICalledExpectation!], timeout: 0.1) XCTAssertEqual(listenerController.onAPICalledApiName?.description, "logCustomEvent:") } - func testLogEventCalledLogCommerceEvent() { + func test_logEvent_callsLogCommerceEvent() { mparticle.logEvent(commerceEvent) wait(for: [listenerController.onAPICalledExpectation!], timeout: 0.1) XCTAssertEqual(listenerController.onAPICalledApiName?.description, "logCommerceEvent:") } - func testLogEventWithFilterReturningNil_blocksEvent() { + func test_logEvent_blocksEvent_whenFilterReturnsNil() { dataPlanFilter.transformEventForBaseEventReturnValue = nil mparticle.logEvent(baseEvent) @@ -53,7 +53,7 @@ final class MParticleEventTests: MParticleTestBase { assertReceivedMessage("Blocked base event from kits", event: baseEvent) } - func testLogBaseEventWithFilterReturningEvent_forwardsTransformedEvent() { + func test_logEvent_forwardsTransformedEvent_whenFilterReturnsEvent() { dataPlanFilter.transformEventForBaseEventReturnValue = transformedBaseEvent mparticle.logEvent(baseEvent) @@ -84,7 +84,7 @@ final class MParticleEventTests: MParticleTestBase { XCTAssertTrue(kitContainer.forwardSDKCallEventParam === transformedBaseEvent) } - func testLogEventCallbackDataFilterNotSet() { + func test_logEventCallback_doesNotLogMessage_whenDataFilterIsNil() { mparticle.dataPlanFilter = nil XCTAssertNil(mparticle.dataPlanFilter) mparticle.logEventCallback(event, execStatus: .success) @@ -92,7 +92,7 @@ final class MParticleEventTests: MParticleTestBase { XCTAssertNil(receivedMessage) } - func testLogEventCallbackDataFilterSetDataFilterReturnNil() { + func test_logEventCallback_blocksEvent_whenFilterReturnsNil() { mparticle.logEventCallback(event, execStatus: .success) XCTAssertTrue(dataPlanFilter.transformEventCalled) diff --git a/UnitTests/SwiftTests/MParticle/MParticleIdentityTests.swift b/UnitTests/SwiftTests/MParticle/MParticleIdentityTests.swift index 0e7ebe7b..f8cc7c4d 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleIdentityTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleIdentityTests.swift @@ -16,7 +16,7 @@ import XCTest final class MParticleIdentityTests: MParticleTestBase { - func testIdentifyNoDispatchCallbackNoErrorDefferedKitAvailable() { + func test_identifyNoDispatchCallback_clearsDeferredKit_whenNoError() { mparticle.deferredKitConfiguration_PRIVATE = [[String: String]]() let expectedApiResult = MPIdentityApiResult() let expectation = XCTestExpectation() @@ -33,7 +33,7 @@ final class MParticleIdentityTests: MParticleTestBase { XCTAssertNil(mparticle.deferredKitConfiguration_PRIVATE) } - func testIdentifyNoDispatchCallbackWithErrorDefferedKitAvailable() { + func test_identifyNoDispatchCallback_logsError_andClearsDeferredKit_whenErrorPresent() { mparticle.deferredKitConfiguration_PRIVATE = [[String: String]]() let expectedApiResult = MPIdentityApiResult() let expectation = XCTestExpectation() diff --git a/UnitTests/SwiftTests/MParticle/MParticleKitBatchTests.swift b/UnitTests/SwiftTests/MParticle/MParticleKitBatchTests.swift index c377a944..b0af5191 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleKitBatchTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleKitBatchTests.swift @@ -14,7 +14,7 @@ import XCTest final class MParticleKitBatchTests: MParticleTestBase { - func testLogKitBatch_withNilBatch_doesNotExecuteOrForward() { + func test_logKitBatch_doesNotExecute_whenBatchIsNil() { mparticle.logKitBatch(nil) assertReceivedMessage("Cannot log nil batch!") @@ -25,7 +25,7 @@ final class MParticleKitBatchTests: MParticleTestBase { XCTAssertFalse(persistenceController.saveCalled) } - func testLogKitBatch_noBatchingKits_andKitsInitialized_doesNothing() { + func test_logKitBatch_doesNothing_whenNoBatchingKits_andKitsInitialized() { kitContainer.kitsInitialized = true kitContainer.hasKitBatchingKitsReturnValue = false @@ -37,7 +37,7 @@ final class MParticleKitBatchTests: MParticleTestBase { XCTAssertFalse(persistenceController.saveCalled) } - func testLogKitBatch_kitsNotInitialized_defersWorkUntilInitialization() { + func test_logKitBatch_defersExecution_untilKitsInitialized() { kitContainer.kitsInitialized = false kitContainer.hasKitBatchingKitsReturnValue = true @@ -62,7 +62,7 @@ final class MParticleKitBatchTests: MParticleTestBase { XCTAssertNotNil(kitContainer.forwardSDKCallKitHandlerParam) } - func testLogKitBatch_withBatchingKits_forwardsParsedBatch_andPersistsForwardRecords() { + func test_logKitBatch_forwardsParsedBatch_andPersistsRecords_whenBatchingKitsAvailable() { kitContainer.kitsInitialized = true kitContainer.hasKitBatchingKitsReturnValue = true @@ -76,7 +76,7 @@ final class MParticleKitBatchTests: MParticleTestBase { XCTAssertNotNil(kitContainer.forwardSDKCallKitHandlerParam) } - func testLogKitBatch_invokesKitHandler_andPersistsForwardRecords() { + func test_logKitBatch_executesKitHandler_andPersistsForwardRecords() { kitContainer.kitsInitialized = true kitContainer.hasKitBatchingKitsReturnValue = true @@ -107,7 +107,7 @@ final class MParticleKitBatchTests: MParticleTestBase { XCTAssertTrue(persistenceController.saveForwardRecordParam === forwardRecord) } - func testLogKitBatch_invalidJSON_stillForwardsWithNilBatch() { + func test_logKitBatch_forwardsWithNilBatch_whenJSONInvalid() { kitContainer.kitsInitialized = true kitContainer.hasKitBatchingKitsReturnValue = true diff --git a/UnitTests/SwiftTests/MParticle/MParticleLTVTests.swift b/UnitTests/SwiftTests/MParticle/MParticleLTVTests.swift index 4a7c12d2..8b81e545 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleLTVTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleLTVTests.swift @@ -14,7 +14,7 @@ import XCTest final class MParticleLTVTests: MParticleTestBase { - func testLogLTVIncrease_withNameAndInfo_createsEventAndCallsBackend() { + func test_logLTVIncrease_createsTransactionEvent_andCallsBackend_whenEventInfoProvided() { let amount = 42.0 let name = "name" let info: [String: Any] = ["source": "in_app", "currency": "USD"] @@ -47,7 +47,7 @@ final class MParticleLTVTests: MParticleTestBase { completion(loggedEvent, .success) } - func testLogLTVIncrease_withoutEventInfo_defaultsToNilInfo() { + func test_logLTVIncrease_createsTransactionEvent_withDefaultAttributes_whenEventInfoNil() { let amount = 12.5 let name = "name" @@ -78,7 +78,7 @@ final class MParticleLTVTests: MParticleTestBase { completion(loggedEvent, .success) } - func testLogLTVIncreaseCallback_withSuccessExecStatus_noDataPlanFilter_forwardsEvent() { + func test_logLTVIncreaseCallback_blocksEvent_whenFilterReturnsNil() { dataPlanFilter.transformEventReturnValue = nil mparticle.logLTVIncreaseCallback(event, execStatus: .success) @@ -89,7 +89,7 @@ final class MParticleLTVTests: MParticleTestBase { assertReceivedMessage("Blocked LTV increase event from kits", event: event) } - func testLogLTVIncreaseCallback_withSuccessExecStatus_filterReturnsTransformedEvent_forwardsTransformedEvent() { + func test_logLTVIncreaseCallback_forwardsTransformedEvent_whenFilterReturnsEvent() { dataPlanFilter.transformEventReturnValue = transformedEvent mparticle.logLTVIncreaseCallback(event, execStatus: .success) diff --git a/UnitTests/SwiftTests/MParticle/MParticleOpenURLTests.swift b/UnitTests/SwiftTests/MParticle/MParticleOpenURLTests.swift index 6b7d3cd5..b2477dad 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleOpenURLTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleOpenURLTests.swift @@ -17,7 +17,7 @@ import ObjectiveC.runtime #if os(iOS) final class MParticleOpenURLTests: MParticleTestBase { - func testOpenURLSourceApplication_doesNothing_whenProxiedDelegateExists() { + func test_openURLWithSourceApplication_doesNotCallHandler_whenProxiedDelegateExists() { mparticle.setValue(NSNumber(value: true), forKey: "proxiedAppDelegate") let url = URL(string: "https://example.com")! @@ -28,7 +28,7 @@ final class MParticleOpenURLTests: MParticleTestBase { XCTAssertFalse(appNotificationHandler.openURLWithSourceApplicationAndAnnotationCalled) } - func testOpenURLSourceApplication_callsHandler_whenNoProxiedDelegate() { + func test_openURLWithSourceApplication_callsHandler_whenNoProxiedDelegate() { let sourceApp = "com.example.app" let annotation = "annotation" @@ -40,7 +40,7 @@ final class MParticleOpenURLTests: MParticleTestBase { XCTAssertEqual(appNotificationHandler.openURLWithSourceApplicationAndAnnotationAnnotationParam as! String, annotation) } - func testOpenURLOptions_callsHandler_whenNoProxiedDelegate_andIOSVersion9OrHigher() { + func test_openURLOptions_callsHandler_whenNoProxiedDelegate_andSystemVersion9OrHigher() { let options = ["UIApplicationOpenURLOptionsSourceApplicationKey": "com.example.app"] mparticle.open(url, options: options) @@ -50,7 +50,7 @@ final class MParticleOpenURLTests: MParticleTestBase { XCTAssertEqual(appNotificationHandler.openURLWithOptionsOptionsParam?["UIApplicationOpenURLOptionsSourceApplicationKey"] as? String, "com.example.app") } - func testOpenURLOptions_doesNothing_whenProxiedDelegateExists() { + func test_openURLOptions_doesNotCallHandler_whenProxiedDelegateExists() { mparticle.setValue(NSNumber(value: true), forKey: "proxiedAppDelegate") let options = ["UIApplicationOpenURLOptionsSourceApplicationKey": "com.example.app"] @@ -59,7 +59,7 @@ final class MParticleOpenURLTests: MParticleTestBase { XCTAssertFalse(appNotificationHandler.openURLWithOptionsCalled) } - func testOpenURLOptions_doesNothing_whenSystemVersionBelow9() { + func test_openURLOptions_doesNotCallHandler_whenSystemVersionBelow9() { let currentDevice = UIDevice.current let origSelector = NSSelectorFromString("systemVersion") let mockedVersion: @convention(block) () -> String = { "8.4" } diff --git a/UnitTests/SwiftTests/MParticle/MParticlePushNotificationTokenTests.swift b/UnitTests/SwiftTests/MParticle/MParticlePushNotificationTokenTests.swift index 8a07dc07..9add33cb 100644 --- a/UnitTests/SwiftTests/MParticle/MParticlePushNotificationTokenTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticlePushNotificationTokenTests.swift @@ -15,7 +15,7 @@ import XCTest #if os(iOS) final class MParticlePushNotificationTokenTests: MParticleTestBase { - func testPushNotificationToken_returnsDeviceToken_whenNotAppExtension() { + func test_pushNotificationToken_returnsDeviceToken_whenNotAppExtension() { notificationController.deviceTokenReturnValue = token appEnvironmentProvier.isAppExtensionReturnValue = false @@ -27,7 +27,7 @@ final class MParticlePushNotificationTokenTests: MParticleTestBase { XCTAssertTrue(appEnvironmentProvier.isAppExtensionCalled) } - func testPushNotificationToken_returnsNil_whenAppExtension() { + func test_pushNotificationToken_returnsNil_whenAppExtension() { notificationController.deviceTokenReturnValue = token appEnvironmentProvier.isAppExtensionReturnValue = true @@ -39,7 +39,7 @@ final class MParticlePushNotificationTokenTests: MParticleTestBase { XCTAssertTrue(appEnvironmentProvier.isAppExtensionCalled) } - func testSetPushNotificationToken_setsToken_whenNotAppExtension() { + func test_setPushNotificationToken_updatesController_whenNotAppExtension() { appEnvironmentProvier.isAppExtensionReturnValue = false mparticle.pushNotificationToken = token @@ -49,7 +49,7 @@ final class MParticlePushNotificationTokenTests: MParticleTestBase { XCTAssertEqual(notificationController.setDeviceTokenParam, token) } - func testSetPushNotificationToken_doesNothing_whenAppExtension() { + func test_setPushNotificationToken_doesNothing_whenAppExtension() { appEnvironmentProvier.isAppExtensionReturnValue = true mparticle.pushNotificationToken = token diff --git a/UnitTests/SwiftTests/MParticle/MParticleRemoteNotificationTests.swift b/UnitTests/SwiftTests/MParticle/MParticleRemoteNotificationTests.swift index c85a743f..f202c14e 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleRemoteNotificationTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleRemoteNotificationTests.swift @@ -15,7 +15,7 @@ import XCTest #if os(iOS) final class MParticleRemoteNotificationTests: MParticleTestBase { - func testDidReceiveRemoteNotification_doesNothing_whenProxiedAppDelegateExists() { + func test_didReceiveRemoteNotification_doesNotCallHandler_whenProxiedDelegateExists() { mparticle.setValue(NSNumber(value: true), forKey: "proxiedAppDelegate") mparticle.didReceiveRemoteNotification([:]) @@ -24,7 +24,7 @@ final class MParticleRemoteNotificationTests: MParticleTestBase { XCTAssertFalse(appEnvironmentProvier.isAppExtensionCalled) } - func testDidReceiveRemoteNotification_doesNothing_whenAppExtension() { + func test_didReceiveRemoteNotification_doesNotCallHandler_whenAppExtension() { appEnvironmentProvier.isAppExtensionReturnValue = true mparticle.didReceiveRemoteNotification(keyValueDict) @@ -35,7 +35,7 @@ final class MParticleRemoteNotificationTests: MParticleTestBase { - func testDidReceiveRemoteNotification_forwardsToHandler_whenNotAppExtension_andNoProxiedDelegate() { + func test_didReceiveRemoteNotification_callsHandler_whenNotAppExtension_andNoProxiedDelegate() { appEnvironmentProvier.isAppExtensionReturnValue = false mparticle.didReceiveRemoteNotification(keyValueDict) @@ -45,7 +45,7 @@ final class MParticleRemoteNotificationTests: MParticleTestBase { XCTAssertEqual(appNotificationHandler.didReceiveRemoteNotificationParam?[keyValueDict.keys.first!] as? String, keyValueDict.values.first) } - func testDidFailToRegisterForRemoteNotificationsWithError_doesNothing_whenAppExtension() { + func test_didFailToRegisterForRemoteNotifications_doesNotCallHandler_whenAppExtension() { appEnvironmentProvier.isAppExtensionReturnValue = true mparticle.didFailToRegisterForRemoteNotificationsWithError(error) @@ -54,7 +54,7 @@ final class MParticleRemoteNotificationTests: MParticleTestBase { XCTAssertFalse(appNotificationHandler.didFailToRegisterForRemoteNotificationsWithErrorCalled) } - func testDidFailToRegisterForRemoteNotificationsWithError_doesNothing_whenProxiedDelegateSet() { + func test_didFailToRegisterForRemoteNotifications_doesNotCallHandler_whenProxiedDelegateExists() { appEnvironmentProvier.isAppExtensionReturnValue = false mparticle.setValue(NSNumber(value: true), forKey: "proxiedAppDelegate") @@ -65,7 +65,7 @@ final class MParticleRemoteNotificationTests: MParticleTestBase { XCTAssertFalse(appNotificationHandler.didFailToRegisterForRemoteNotificationsWithErrorCalled) } - func testDidFailToRegisterForRemoteNotificationsWithError_forwardsToHandler_whenNotAppExtension_andNoProxiedDelegate() { + func test_didFailToRegisterForRemoteNotifications_callsHandler_whenNotAppExtension_andNoProxiedDelegate() { appEnvironmentProvier.isAppExtensionReturnValue = false mparticle.didFailToRegisterForRemoteNotificationsWithError(error) @@ -75,7 +75,7 @@ final class MParticleRemoteNotificationTests: MParticleTestBase { XCTAssertEqual(appNotificationHandler.didFailToRegisterForRemoteNotificationsWithErrorParam as NSError?, error) } - func testDidRegisterForRemoteNotificationsWithDeviceToken_doesNothing_whenAppExtension() { + func test_didRegisterForRemoteNotifications_doesNotCallHandler_whenAppExtension() { appEnvironmentProvier.isAppExtensionReturnValue = true mparticle.didRegisterForRemoteNotifications(withDeviceToken: token) @@ -84,7 +84,7 @@ final class MParticleRemoteNotificationTests: MParticleTestBase { XCTAssertFalse(appNotificationHandler.didFailToRegisterForRemoteNotificationsWithDeviceTokenCalled) } - func testDidRegisterForRemoteNotificationsWithDeviceToken_doesNothing_whenProxiedDelegateExists() { + func test_didRegisterForRemoteNotifications_doesNotCallHandler_whenProxiedDelegateExists() { appEnvironmentProvier.isAppExtensionReturnValue = false mparticle.setValue(NSNumber(value: true), forKey: "proxiedAppDelegate") @@ -95,7 +95,7 @@ final class MParticleRemoteNotificationTests: MParticleTestBase { XCTAssertFalse(appNotificationHandler.didFailToRegisterForRemoteNotificationsWithDeviceTokenCalled) } - func testDidRegisterForRemoteNotificationsWithDeviceToken_callsHandler_whenNotAppExtension_andNoProxiedDelegate() { + func test_didRegisterForRemoteNotifications_callsHandler_whenNotAppExtension_andNoProxiedDelegate() { appEnvironmentProvier.isAppExtensionReturnValue = false mparticle.didRegisterForRemoteNotifications(withDeviceToken: token) @@ -105,7 +105,7 @@ final class MParticleRemoteNotificationTests: MParticleTestBase { XCTAssertEqual(appNotificationHandler.didFailToRegisterForRemoteNotificationsWithDeviceTokenParam, token) } - func testHandleActionWithIdentifierForRemoteNotification_doesNothing_whenAppExtension() { + func test_handleActionForRemoteNotification_doesNotCallHandler_whenAppExtension() { appEnvironmentProvier.isAppExtensionReturnValue = true mparticle.handleAction(withIdentifier: testName, forRemoteNotification: keyValueDict) @@ -114,7 +114,7 @@ final class MParticleRemoteNotificationTests: MParticleTestBase { XCTAssertFalse(appNotificationHandler.handleActionWithIdentifierForRemoteNotificationCalled) } - func testHandleActionWithIdentifierForRemoteNotification_doesNothing_whenProxiedDelegateExists() { + func test_handleActionForRemoteNotification_doesNotCallHandler_whenProxiedDelegateExists() { appEnvironmentProvier.isAppExtensionReturnValue = false mparticle.setValue(NSNumber(value: true), forKey: "proxiedAppDelegate") @@ -125,7 +125,7 @@ final class MParticleRemoteNotificationTests: MParticleTestBase { XCTAssertFalse(appNotificationHandler.handleActionWithIdentifierForRemoteNotificationCalled) } - func testHandleActionWithIdentifierForRemoteNotification_callsHandler_whenNotAppExtension_andNoProxiedDelegate() { + func test_handleActionForRemoteNotification_callsHandler_whenNotAppExtension_andNoProxiedDelegate() { appEnvironmentProvier.isAppExtensionReturnValue = false mparticle.handleAction(withIdentifier: testName, forRemoteNotification: keyValueDict) @@ -135,7 +135,7 @@ final class MParticleRemoteNotificationTests: MParticleTestBase { XCTAssertEqual(appNotificationHandler.handleActionWithIdentifierForRemoteNotificationUserInfoParam?[keyValueDict.keys.first!] as? String, keyValueDict.values.first) } - func testHandleActionWithIdentifierForRemoteNotificationWithResponseInfo_doesNothing_whenAppExtension() { + func test_handleActionForRemoteNotificationWithResponseInfo_doesNotCallHandler_whenAppExtension() { appEnvironmentProvier.isAppExtensionReturnValue = true mparticle.handleAction(withIdentifier: testName, forRemoteNotification: keyValueDict, withResponseInfo: responseKeyValueDict) @@ -144,7 +144,7 @@ final class MParticleRemoteNotificationTests: MParticleTestBase { XCTAssertFalse(appNotificationHandler.handleActionWithIdentifierForRemoteNotificationWithResponseInfoCalled) } - func testHandleActionWithIdentifierForRemoteNotificationWithResponseInfo_doesNothing_whenProxiedDelegateExists() { + func test_handleActionForRemoteNotificationWithResponseInfo_doesNotCallHandler_whenProxiedDelegateExists() { appEnvironmentProvier.isAppExtensionReturnValue = false mparticle.setValue(NSNumber(value: true), forKey: "proxiedAppDelegate") @@ -155,7 +155,7 @@ final class MParticleRemoteNotificationTests: MParticleTestBase { XCTAssertFalse(appNotificationHandler.handleActionWithIdentifierForRemoteNotificationWithResponseInfoCalled) } - func testHandleActionWithIdentifierForRemoteNotificationWithResponseInfo_callsHandler_whenNotAppExtension_andNoProxiedDelegate() { + func test_handleActionForRemoteNotificationWithResponseInfo_callsHandler_whenNotAppExtension_andNoProxiedDelegate() { appEnvironmentProvier.isAppExtensionReturnValue = false mparticle.handleAction(withIdentifier: testName, forRemoteNotification: keyValueDict, withResponseInfo: responseKeyValueDict) diff --git a/UnitTests/SwiftTests/MParticle/MParticleRuntimeValuesTests.swift b/UnitTests/SwiftTests/MParticle/MParticleRuntimeValuesTests.swift index 39bdbdf8..494fd472 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleRuntimeValuesTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleRuntimeValuesTests.swift @@ -14,58 +14,58 @@ import XCTest final class MParticleRuntimeValuesTests: MParticleTestBase { - func testSetSharedInstance() { + func test_setSharedInstance_notifiesListener() { MParticle.setSharedInstance(mparticle) XCTAssertEqual(listenerController.onAPICalledApiName?.description, "setSharedInstance:") XCTAssertTrue(listenerController.onAPICalledParameter1 === mparticle) } - func testSetOptOutCompletionSuccess() { + func test_setOptOutCompletion_logsMessage_onSuccess() { mparticle.setOptOutCompletion(.success, optOut: true) assertReceivedMessage("Set Opt Out: 1") } - func testSetOptOutCompletionFailure() { + func test_setOptOutCompletion_logsError_onFailure() { mparticle.setOptOutCompletion(.fail, optOut: true) assertReceivedMessage("Set Opt Out Failed: 1") } - func testIndentityReturnsTheSameObject() { + func test_identity_returnsSameInstance() { let identity = mparticle.identity XCTAssertTrue(identity === mparticle.identity) } - func testRoktReturnsTheSameObject() { + func test_rokt_returnsSameInstance() { let rokt = mparticle.rokt XCTAssertTrue(rokt === mparticle.rokt) } - func testSessionTimeoutReturnsValueFromBackendController() { + func test_sessionTimeout_returnsValue_fromBackendController() { mparticle.backendController.sessionTimeout = 100 XCTAssertEqual(mparticle.sessionTimeout, 100) } - func testUniqueIdentifierRwturnedFromStateMachine() { + func test_uniqueIdentifier_returnsValue_fromStateMachine() { state.consumerInfo.uniqueIdentifier = "test" XCTAssertEqual(mparticle.uniqueIdentifier, "test") } - func testSetUploadIntervalChangeValueInBackendControllerWhenIntervalGreaterThenOne() { + func test_setUploadInterval_updatesBackend_whenValueGreaterThanOne() { mparticle.setUploadInterval(3) XCTAssertEqual(backendController.uploadInterval, 3) } - func testSetUploadIntervalNotChangeValueInBackendControllerWhenIntervalLessThenOne() { + func test_setUploadInterval_doesNotUpdateBackend_whenValueLessThanOne() { mparticle.setUploadInterval(0.1) XCTAssertEqual(backendController.uploadInterval, 0.0) } - func testUploadIntervalGetFromBackendController() { + func test_uploadInterval_returnsValue_fromBackendController() { backendController.uploadInterval = 100 XCTAssertEqual(mparticle.uploadInterval, 100) } - func testUserAttributesForUserIdRequestDataFromBackendController() { + func test_userAttributes_fetchesFromBackend_forUserId() { backendController.userAttributesReturnValue = ["key": "value"] let dictionary = mparticle.userAttributes(forUserId: 1) XCTAssertEqual(dictionary?["key"] as? String, "value") @@ -73,9 +73,11 @@ final class MParticleRuntimeValuesTests: MParticleTestBase { XCTAssertEqual(backendController.userAttributesUserIdParam, 1) } - func testSetOptOutOptOutValueIsDifferentItShouldBeChangedAndDeliveredToBackendController() { + func test_optOut_updatesState_andNotifiesBackend() { XCTAssertFalse(state.optOut) + mparticle.optOut = true + XCTAssertTrue(state.optOut) XCTAssertTrue(backendController.setOptOutCalled) XCTAssertEqual(backendController.setOptOutOptOutStatusParam, true) diff --git a/UnitTests/SwiftTests/MParticle/MParticleScreenEventTests.swift b/UnitTests/SwiftTests/MParticle/MParticleScreenEventTests.swift index 335aa46c..ff6a838c 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleScreenEventTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleScreenEventTests.swift @@ -14,7 +14,7 @@ import XCTest final class MParticleScreenEventTests: MParticleTestBase { - func testLogScreenEvent_dataPlanFilterReturnsNil_blocksEvent() { + func test_logScreenEvent_blocksEvent_whenFilterReturnsNil() { mparticle.logScreenEvent(event) XCTAssertTrue(executor.executeOnMessageQueueAsync) @@ -30,7 +30,7 @@ final class MParticleScreenEventTests: MParticleTestBase { assertReceivedMessage("Blocked screen event from kits", event: event) } - func testLogScreenEvent_tracesFullExecutionFlow() { + func test_logScreenEvent_executesFullFlow_whenFilterReturnsEvent() { dataPlanFilter.transformEventForScreenEventReturnValue = event mparticle.logScreenEvent(event) @@ -57,7 +57,7 @@ final class MParticleScreenEventTests: MParticleTestBase { XCTAssertNil(kitContainer.forwardSDKCallUserInfoParam) } - func testLogScreenWrapper_withNilScreenName_logsErrorAndReturns() { + func test_logScreen_logsError_andReturns_whenScreenNameIsEmpty() { mparticle.logScreen("", eventInfo: event.customAttributes) assertReceivedMessage("Screen name is required.") @@ -67,7 +67,7 @@ final class MParticleScreenEventTests: MParticleTestBase { XCTAssertFalse(backendController.logScreenCalled) } - func testLogScreenWrapper_callsLogScreen() { + func test_logScreen_callsLogScreenEvent_whenEventExists() { backendController.eventWithNameReturnValue = event dataPlanFilter.transformEventForScreenEventReturnValue = event @@ -95,7 +95,7 @@ final class MParticleScreenEventTests: MParticleTestBase { XCTAssertNil(kitContainer.forwardSDKCallUserInfoParam) } - func testLogScreen_withNoExistingEvent_createsNewEventOfTypeNavigation() { + func test_logScreen_createsNavigationEvent_whenNoExistingEventFound() { backendController.eventWithNameReturnValue = nil let mockMPNavEvent = MPEvent(name: testName, type: .navigation)! mockMPNavEvent.customAttributes = keyValueDict @@ -127,7 +127,7 @@ final class MParticleScreenEventTests: MParticleTestBase { XCTAssertNil(kitContainer.forwardSDKCallUserInfoParam) } - func testLogScreenCallbackDataFilterNotSet() { + func test_logScreenCallback_logsMessage_whenDataFilterIsNil() { mparticle.dataPlanFilter = nil XCTAssertNil(mparticle.dataPlanFilter) mparticle.logScreenCallback(event, execStatus: .success) @@ -135,7 +135,7 @@ final class MParticleScreenEventTests: MParticleTestBase { assertReceivedMessage("Logged screen event", event: event) } - func testLogScreenCallbackDataFilterSetDataFilterReturnNil() { + func test_logScreenCallback_blocksEvent_whenFilterReturnsNil() { mparticle.logScreenCallback(event, execStatus: .success) XCTAssertTrue(dataPlanFilter.transformEventForScreenEventCalled) diff --git a/UnitTests/SwiftTests/MParticle/MParticleSessionTests.swift b/UnitTests/SwiftTests/MParticle/MParticleSessionTests.swift index 4644e902..2c489ae4 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleSessionTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleSessionTests.swift @@ -16,21 +16,21 @@ import XCTest final class MParticleSessionTests: MParticleTestBase { - func testBeginSessionTempSessionAvailableSessionTempSessionShouldNotBeCreated() { + func test_beginSession_doesNotCreateTempSession_whenTempSessionExists() { backendController.session = nil backendController.tempSessionReturnValue = MParticleSession() mparticle.beginSession() XCTAssertFalse(backendController.createTempSessionCalled) } - func testBeginSessionSessionAvailableSessionTempSessionShouldNotBeCreated() { + func test_beginSession_doesNotCreateTempSession_whenSessionExists() { backendController.session = MPSession() backendController.tempSessionReturnValue = nil mparticle.beginSession() XCTAssertFalse(backendController.createTempSessionCalled) } - func testBeginSessionSessionUnavailable() { + func test_beginSession_createsAndBeginsSession_whenNoSessionExists() { backendController.session = nil backendController.tempSessionReturnValue = nil mparticle.beginSession() @@ -41,14 +41,14 @@ final class MParticleSessionTests: MParticleTestBase { XCTAssertNotNil(backendController.beginSessionDateParam) } - func testEndSessionNoSession() { + func test_endSession_doesNothing_whenNoActiveSession() { backendController.session = nil mparticle.endSession() XCTAssertEqual(executor.executeOnMessageQueueAsync, true) XCTAssertFalse(backendController.endSessionWithIsManualCalled) } - func testEndSessionWithSession() { + func test_endSession_endsActiveSession_whenSessionExists() { backendController.session = MPSession() mparticle.endSession() XCTAssertEqual(executor.executeOnMessageQueueAsync, true) @@ -56,7 +56,7 @@ final class MParticleSessionTests: MParticleTestBase { XCTAssertEqual(backendController.endSessionIsManualParam, true) } - func testSessionDidBegin() { + func test_sessionDidBegin_forwardsCall_toKitContainer() { kitContainer.forwardSDKCallExpectation = XCTestExpectation() mparticle.sessionDidBegin(MPSession()) @@ -70,7 +70,7 @@ final class MParticleSessionTests: MParticleTestBase { XCTAssertNil(kitContainer.forwardSDKCallUserInfoParam) } - func testSessionDidEnd() { + func test_sessionDidEnd_forwardsCall_toKitContainer() { kitContainer.forwardSDKCallExpectation = XCTestExpectation() mparticle.sessionDidEnd(MPSession()) diff --git a/UnitTests/SwiftTests/MParticle/MParticleTimedEventTests.swift b/UnitTests/SwiftTests/MParticle/MParticleTimedEventTests.swift index d84031ad..5d145422 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleTimedEventTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleTimedEventTests.swift @@ -14,7 +14,7 @@ import XCTest final class MParticleTimedEventTests: MParticleTestBase { - func testBeginTimedEventCompletionHandlerDataFilterNotSet() { + func test_beginTimedEventCompletionHandler_logsMessage_whenDataFilterIsNil() { mparticle.dataPlanFilter = nil XCTAssertNil(mparticle.dataPlanFilter) @@ -22,14 +22,14 @@ final class MParticleTimedEventTests: MParticleTestBase { assertReceivedMessage("Began timed event", event: event) } - func testBeginTimedEventCompletionHandlerDataFilterSetDataFilterReturnNil() { + func test_beginTimedEventCompletionHandler_blocksEvent_whenFilterReturnsNil() { mparticle.beginTimedEventCompletionHandler(event, execStatus: .success) XCTAssertTrue(dataPlanFilter.transformEventCalled) XCTAssertEqual(dataPlanFilter.transformEventEventParam, event) assertReceivedMessage("Blocked timed event begin from kits", event: event) } - func testBeginTimedEventDependenciesReceiveCorrectParametersAndHandlerExecutedWithoutErrors() { + func test_beginTimedEvent_invokesDependencies_andExecutesCompletionHandler() { mparticle.beginTimedEvent(event) XCTAssertEqual(listenerController.onAPICalledApiName?.description, "beginTimedEvent:") XCTAssertEqual(listenerController.onAPICalledParameter1, event) diff --git a/UnitTests/SwiftTests/MParticle/MParticleUserActivityTests.swift b/UnitTests/SwiftTests/MParticle/MParticleUserActivityTests.swift index dbcaff0c..34e16734 100644 --- a/UnitTests/SwiftTests/MParticle/MParticleUserActivityTests.swift +++ b/UnitTests/SwiftTests/MParticle/MParticleUserActivityTests.swift @@ -16,7 +16,7 @@ import ObjectiveC.runtime #if os(iOS) final class MParticleUserActivityTests: MParticleTestBase { - func testContinueUserActivity_returnsFalseAndDoesNotCallHandler_whenProxiedDelegateExists() { + func test_continueUserActivity_returnsFalse_andDoesNotCallHandler_whenProxiedDelegateExists() { mparticle.setValue(NSNumber(value: true), forKey: "proxiedAppDelegate") let activity = NSUserActivity(activityType: "com.example.test") @@ -27,7 +27,7 @@ final class MParticleUserActivityTests: MParticleTestBase { XCTAssertFalse(appNotificationHandler.continueUserActivityCalled) } - func testContinueUserActivity_returnsFalse_whenHandlerReturnsFalse() { + func test_continueUserActivity_returnsFalse_whenHandlerReturnsFalse() { let activity = NSUserActivity(activityType: "com.example.test") appNotificationHandler.continueUserActivityReturnValue = false