From 5f86699ae4af3646a740afe10a13b92aa63350d7 Mon Sep 17 00:00:00 2001 From: Miranda Wilson Date: Tue, 16 Apr 2024 10:35:13 +0100 Subject: [PATCH] Clean up test warnings --- .../snowplow/event/AbstractEventTest.kt | 1 + .../snowplow/event/DeepLinkReceivedTest.kt | 4 ++-- .../snowplow/event/EcommerceItemTest.kt | 2 ++ .../snowplow/event/EcommerceTransactionTest.kt | 2 ++ .../snowplow/event/MessageNotificationTest.kt | 1 + .../RemoteConfigurationTest.kt | 10 +++++----- .../internal/tracker/ConfigurationTest.kt | 18 +++++++++--------- .../internal/tracker/MockDeviceInfoMonitor.kt | 12 ++++++------ .../internal/tracker/MultipleInstancesTest.kt | 4 ++-- .../internal/tracker/StateManagerTest.kt | 1 + .../snowplow/tracker/ExecutorTest.kt | 2 +- .../tracker/FocalMeterConfigurationTest.kt | 14 +++++++------- .../snowplow/tracker/MockEventStore.kt | 2 +- .../snowplow/tracker/NetworkConnectionTest.kt | 8 ++++---- .../snowplow/tracker/SessionTest.kt | 1 + .../tracker/integration/EventSendingTest.kt | 1 + .../snowplow/tracker/noise/NoiseTest.kt | 1 + 17 files changed, 47 insertions(+), 37 deletions(-) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AbstractEventTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AbstractEventTest.kt index 427d50e9e..f720d2426 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AbstractEventTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/AbstractEventTest.kt @@ -22,6 +22,7 @@ import org.junit.runner.RunWith class AbstractEventTest { @Test + @Suppress("deprecation") fun testAddsEntitiesUsingAllAPIs() { val event = ScreenView("screen") val entity1 = SelfDescribingJson("schema1", "data1") diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/DeepLinkReceivedTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/DeepLinkReceivedTest.kt index dedb56500..1d996afd8 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/DeepLinkReceivedTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/DeepLinkReceivedTest.kt @@ -84,7 +84,7 @@ class DeepLinkReceivedTest { val events = eventStore.getEmittableEvents(10) eventStore.removeAllEvents() Assert.assertEquals(1, events.size.toLong()) - val payload = events[0]!!.payload + val payload = events[0].payload // Check url and referrer fields for atomic table val url = payload.map[Parameters.PAGE_URL] as String? @@ -135,7 +135,7 @@ class DeepLinkReceivedTest { Assert.assertEquals(2, events.size.toLong()) var screenViewPayload: Map<*, *>? = null for (emitterEvent in events) { - if (emitterEvent!!.payload.map["eid"] == screenViewEventId.toString()) { + if (emitterEvent.payload.map["eid"] == screenViewEventId.toString()) { screenViewPayload = emitterEvent.payload.map break } diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceItemTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceItemTest.kt index 7c876b157..458c89954 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceItemTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceItemTest.kt @@ -20,7 +20,9 @@ import org.junit.runner.RunWith import java.lang.Exception @RunWith(AndroidJUnit4::class) +@Suppress("deprecation") class EcommerceItemTest { + // NB this event type has been deprecated @Test fun testExpectedForm() { diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionTest.kt index e9cb4cfc7..0a8ab9d71 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/EcommerceTransactionTest.kt @@ -19,7 +19,9 @@ import org.junit.Test import org.junit.runner.RunWith @RunWith(AndroidJUnit4::class) +@Suppress("deprecation") class EcommerceTransactionTest { + // NB this event type has been deprecated @Test fun testExpectedForm() { diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/MessageNotificationTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/MessageNotificationTest.kt index 42e082c11..9bb9e5948 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/MessageNotificationTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/event/MessageNotificationTest.kt @@ -20,6 +20,7 @@ import org.junit.runner.RunWith @RunWith(AndroidJUnit4::class) class MessageNotificationTest { @Test + @Suppress("unchecked_cast") fun testExpectedForm() { val event = MessageNotification("title", "body", MessageNotificationTrigger.push) .notificationTimestamp("2020-12-31T15:59:60-08:00") diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/remoteconfiguration/RemoteConfigurationTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/remoteconfiguration/RemoteConfigurationTest.kt index fd9e46be5..6609ddd66 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/remoteconfiguration/RemoteConfigurationTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/remoteconfiguration/RemoteConfigurationTest.kt @@ -95,7 +95,7 @@ class RemoteConfigurationTest { "{\"\$schema\":\"http://iglucentral.com/schemas/com.snowplowanalytics.mobile/remote_config/jsonschema/1-0-0\",\"configurationVersion\":12,\"configurationBundle\":[]}" withMockServer(200, body) { _, endpoint -> - val expectation = Any() as Object + val expectation = Object() val remoteConfig = RemoteConfiguration(endpoint, HttpMethod.GET) RemoteConfigurationFetcher( context, @@ -180,7 +180,7 @@ class RemoteConfigurationTest { ) { _, endpoint -> // test - val expectation = Any() as Object + val expectation = Object() val expectationNotified = AtomicBoolean(false) val remoteConfig = RemoteConfiguration(endpoint, HttpMethod.GET) RemoteConfigurationFetcher( @@ -333,7 +333,7 @@ class RemoteConfigurationTest { cached.configurationVersion = 1 cached.configurationBundle = listOf(bundle) cache.writeCache(context, cached) - val expectation = Any() as Object + val expectation = Object() val provider = RemoteConfigurationProvider(remoteConfig) provider.retrieveConfiguration( context, @@ -371,7 +371,7 @@ class RemoteConfigurationTest { cached.configurationVersion = 1 cached.configurationBundle = listOf(bundle) cache.writeCache(context, cached) - val expectation = Any() as Object + val expectation = Object() val provider = RemoteConfigurationProvider(remoteConfig) provider.retrieveConfiguration( context, @@ -387,7 +387,7 @@ class RemoteConfigurationTest { mockWebServer.enqueue(mockResponse) // test - val expectation2 = Any() as Object + val expectation2 = Object() var numCallbackCalls = 0 provider.retrieveConfiguration( context, diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/ConfigurationTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/ConfigurationTest.kt index 1b058e2a0..da9761cc5 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/ConfigurationTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/ConfigurationTest.kt @@ -108,7 +108,7 @@ class ConfigurationTest { @Test @Throws(InterruptedException::class) fun sessionConfigurationCallback() { - val expectation = Any() as Object + val expectation = Object() val callbackExecuted = AtomicBoolean(false) val context = InstrumentationRegistry.getInstrumentation().targetContext @@ -148,8 +148,8 @@ class ConfigurationTest { @Test @Throws(InterruptedException::class) fun sessionConfigurationCallbackAfterNewSession() { - val expectation1 = Any() as Object - val expectation2 = Any() as Object + val expectation1 = Object() + val expectation2 = Object() val callbackExecuted = AtomicBoolean(false) val sessionId = AtomicReference(null) val context = InstrumentationRegistry.getInstrumentation().targetContext @@ -264,7 +264,7 @@ class ConfigurationTest { val events = eventStore.getEmittableEvents(10) eventStore.removeAllEvents() Assert.assertEquals(1, events.size.toLong()) - val payload = events[0]!!.payload + val payload = events[0].payload // Check v_tracker field val versionTracker = payload.map["tv"] as String? @@ -316,7 +316,7 @@ class ConfigurationTest { var events = eventStore.getEmittableEvents(10) eventStore.removeAllEvents() Assert.assertEquals(1, events.size.toLong()) - var payload = events[0]!!.payload + var payload = events[0].payload var contexts = payload.map["co"] as String? Assert.assertTrue(contexts!!.contains("\"basisForProcessing\":\"contract\"")) Assert.assertTrue(contexts.contains("\"documentId\":\"id1\"")) @@ -337,7 +337,7 @@ class ConfigurationTest { events = eventStore.getEmittableEvents(10) eventStore.removeAllEvents() Assert.assertEquals(1, events.size.toLong()) - payload = events[0]!!.payload + payload = events[0].payload contexts = payload.map["co"] as String? Assert.assertFalse(contexts!!.contains("\"basisForProcessing\":\"contract\"")) Assert.assertFalse(contexts.contains("\"documentId\":\"id1\"")) @@ -382,7 +382,7 @@ class ConfigurationTest { var events = eventStore.getEmittableEvents(10) eventStore.removeAllEvents() Assert.assertEquals(1, events.size.toLong()) - var payload = events[0]!!.payload + var payload = events[0].payload var contexts = payload.map["co"] as String? Assert.assertFalse(contexts!!.contains("\"basisForProcessing\"")) @@ -403,7 +403,7 @@ class ConfigurationTest { events = eventStore.getEmittableEvents(10) eventStore.removeAllEvents() Assert.assertEquals(1, events.size.toLong()) - payload = events[0]!!.payload + payload = events[0].payload contexts = payload.map["co"] as String? Assert.assertTrue(contexts!!.contains("\"basisForProcessing\":\"contract\"")) Assert.assertTrue(contexts.contains("\"documentId\":\"id2\"")) @@ -462,7 +462,7 @@ class ConfigurationTest { val events = eventStore.getEmittableEvents(10) eventStore.removeAllEvents() Assert.assertEquals(1, events.size.toLong()) - val payload = events[0]!!.payload + val payload = events[0].payload val contexts = payload.map["co"] as String? Assert.assertTrue(contexts!!.contains("value1")) Assert.assertTrue(contexts.contains("value2")) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MockDeviceInfoMonitor.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MockDeviceInfoMonitor.kt index 7346702f7..5418164ce 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MockDeviceInfoMonitor.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MockDeviceInfoMonitor.kt @@ -56,7 +56,7 @@ class MockDeviceInfoMonitor : DeviceInfoMonitor() { return "wifi" } - override fun getNetworkTechnology(networkInfo: NetworkInfo?): String? { + override fun getNetworkTechnology(networkInfo: NetworkInfo?): String { increaseMethodAccessCount("getNetworkTechnology") return "3g" } @@ -71,7 +71,7 @@ class MockDeviceInfoMonitor : DeviceInfoMonitor() { return 10 } - override fun getBatteryStateAndLevel(context: Context): Pair? { + override fun getBatteryStateAndLevel(context: Context): Pair { increaseMethodAccessCount("getBatteryStateAndLevel") return Pair("charging", 20) } @@ -97,22 +97,22 @@ class MockDeviceInfoMonitor : DeviceInfoMonitor() { _language = value } - override fun getResolution(context: Context): String? { + override fun getResolution(context: Context): String { increaseMethodAccessCount("getResolution") return "1024x768" } - override fun getScale(context: Context): Float? { + override fun getScale(context: Context): Float { increaseMethodAccessCount("getScale") return 2.0f } - override fun getIsPortrait(context: Context): Boolean? { + override fun getIsPortrait(context: Context): Boolean { increaseMethodAccessCount("getIsPortrait") return true } - override fun getAppSetIdAndScope(context: Context): Pair? { + override fun getAppSetIdAndScope(context: Context): Pair { increaseMethodAccessCount("getAppSetIdAndScope") return Pair("XXX", "app") } diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MultipleInstancesTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MultipleInstancesTest.kt index 913f5583f..9a17caba2 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MultipleInstancesTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/MultipleInstancesTest.kt @@ -77,7 +77,7 @@ class MultipleInstancesTest { fun testDefaultTracker() { val context = InstrumentationRegistry.getInstrumentation().targetContext val t1 = createTracker(context, "t1", NetworkConfiguration("snowplowanalytics.fake")) - val t2 = createTracker(context, "t2", NetworkConfiguration("snowplowanalytics.fake2")) + createTracker(context, "t2", NetworkConfiguration("snowplowanalytics.fake2")) val td = defaultTracker Assert.assertEquals(t1, td) } @@ -85,7 +85,7 @@ class MultipleInstancesTest { @Test fun testUpdateDefaultTracker() { val context = InstrumentationRegistry.getInstrumentation().targetContext - val t1 = createTracker(context, "t1", NetworkConfiguration("snowplowanalytics.fake")) + createTracker(context, "t1", NetworkConfiguration("snowplowanalytics.fake")) val t2 = createTracker(context, "t2", NetworkConfiguration("snowplowanalytics.fake2")) setTrackerAsDefault(t2) val td = defaultTracker diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt index 877bf61a2..2fdc2b0cb 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/internal/tracker/StateManagerTest.kt @@ -34,6 +34,7 @@ import kotlin.collections.ArrayList @RunWith(AndroidJUnit4::class) class StateManagerTest { @Test + @Suppress("unchecked_cast") fun testStateManager() { val stateManager = StateManager() stateManager.addOrReplaceStateMachine(MockStateMachine()) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ExecutorTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ExecutorTest.kt index 195cccfb6..07de6e6cc 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ExecutorTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/ExecutorTest.kt @@ -37,7 +37,7 @@ class ExecutorTest { @Test @Throws(InterruptedException::class) fun testExecutorRaisingException() { - val expectation = Any() as Object + val expectation = Object() val exceptionRaised = AtomicBoolean(false) execute({ throw NullPointerException() }) { t: Throwable? -> exceptionRaised.set(t is NullPointerException) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/FocalMeterConfigurationTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/FocalMeterConfigurationTest.kt index 1fa1dc1b2..58589fd38 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/FocalMeterConfigurationTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/FocalMeterConfigurationTest.kt @@ -43,7 +43,7 @@ class FocalMeterConfigurationTest { // --- TESTS @Test fun logsSuccessfulRequest() { - withMockServer(200) { mockServer, endpoint -> + withMockServer(200) { _, endpoint -> val focalMeter = FocalMeterConfiguration(endpoint) val debugs = mutableListOf() val loggerDelegate = createLoggerDelegate(debugs = debugs) @@ -68,10 +68,10 @@ class FocalMeterConfigurationTest { @Test fun logsSuccessfulRequestWithProcessedUserId() { - withMockServer(200) { mockServer, endpoint -> + withMockServer(200) { _, endpoint -> val focalMeter = FocalMeterConfiguration( kantarEndpoint = endpoint, - processUserId = { userId -> "processed-" + userId } + processUserId = { userId -> "processed-$userId" } ) val debugs = mutableListOf() val loggerDelegate = createLoggerDelegate(debugs = debugs) @@ -94,7 +94,7 @@ class FocalMeterConfigurationTest { @Test fun makesAnotherRequestWhenUserIdChanges() { - withMockServer(200) { mockServer, endpoint -> + withMockServer(200) { _, endpoint -> val focalMeter = FocalMeterConfiguration(endpoint) val debugs = mutableListOf() val loggerDelegate = createLoggerDelegate(debugs = debugs) @@ -113,13 +113,13 @@ class FocalMeterConfigurationTest { Assert.assertEquals( 1, debugs.filter { - it.contains("Request to Kantar endpoint sent with user ID: ${firstUserId}") + it.contains("Request to Kantar endpoint sent with user ID: $firstUserId") }.size ) Assert.assertEquals( 1, debugs.filter { - it.contains("Request to Kantar endpoint sent with user ID: ${secondUserId}") + it.contains("Request to Kantar endpoint sent with user ID: $secondUserId") }.size ) } @@ -127,7 +127,7 @@ class FocalMeterConfigurationTest { @Test fun logsFailedRequest() { - withMockServer(500) { mockServer, endpoint -> + withMockServer(500) { _, endpoint -> val focalMeter = FocalMeterConfiguration(endpoint) val errors = mutableListOf() val loggerDelegate = createLoggerDelegate(errors = errors) diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt index 9f4930b83..e60e71382 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/MockEventStore.kt @@ -42,7 +42,7 @@ class MockEventStore : EventStore { override fun removeEvents(ids: MutableList): Boolean { var result = true for (id in ids) { - val removed = removeEvent(id!!) + val removed = removeEvent(id) result = result && removed } return result diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/NetworkConnectionTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/NetworkConnectionTest.kt index 8236d4ccc..17dc034dd 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/NetworkConnectionTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/NetworkConnectionTest.kt @@ -59,7 +59,7 @@ class NetworkConnectionTest { // Check successful result val result = results[0] Assert.assertTrue(result.isSuccessful) - Assert.assertEquals(1, result.eventIds[0]!!.toLong()) + Assert.assertEquals(1, result.eventIds[0]) mockServer.shutdown() } @@ -82,7 +82,7 @@ class NetworkConnectionTest { // Check unsuccessful result val result = results[0] Assert.assertFalse(result.isSuccessful) - Assert.assertEquals(1, result.eventIds[0]!!.toLong()) + Assert.assertEquals(1, result.eventIds[0]) mockServer.shutdown() } @@ -111,7 +111,7 @@ class NetworkConnectionTest { // Check successful result val result = results[0] Assert.assertTrue(result.isSuccessful) - Assert.assertEquals(1, result.eventIds[0]!!.toLong()) + Assert.assertEquals(1, result.eventIds[0]) mockServer.shutdown() } @@ -135,7 +135,7 @@ class NetworkConnectionTest { // Check unsuccessful result val result = results[0] Assert.assertFalse(result.isSuccessful) - Assert.assertEquals(1, result.eventIds[0]!!.toLong()) + Assert.assertEquals(1, result.eventIds[0]) mockServer.shutdown() } diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt index 062d575c9..cb2c24ace 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/SessionTest.kt @@ -397,6 +397,7 @@ class SessionTest { return Session(foregroundTimeout, backgroundTimeout, TimeUnit.SECONDS, null, context) } + @Suppress("unchecked_cast") private fun getSessionContext( session: Session?, eventId: String, diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt index 99031d24e..0977b0493 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/integration/EventSendingTest.kt @@ -508,6 +508,7 @@ class EventSendingTest { ) } + @Suppress("deprecation") private fun trackEcommerceEvent(tracker: Tracker) { val item = EcommerceTransactionItem("sku-1", 35.00, 1).name("Acme 1").category("Stuff") .currency("AUD") diff --git a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/noise/NoiseTest.kt b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/noise/NoiseTest.kt index 704c204f2..a49e90aa4 100644 --- a/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/noise/NoiseTest.kt +++ b/snowplow-tracker/src/androidTest/java/com/snowplowanalytics/snowplow/tracker/noise/NoiseTest.kt @@ -50,6 +50,7 @@ class NoiseTest { } companion object { + @Suppress("unchecked_cast") private fun superficialEnumCodeCoverage(enumClass: Class?>) { try { for (o in enumClass.getMethod("values").invoke(null) as Array) {