Skip to content

Commit

Permalink
chore(security): use kotest instead of old version called kotlintest
Browse files Browse the repository at this point in the history
SUITEDEV-36111

Co-authored-by: Co-authored-by: LasOri <[email protected]>
Co-authored-by: Co-authored-by: Andras Sarro <[email protected]>
  • Loading branch information
3 people committed Jul 11, 2024
1 parent afb7adf commit d99175e
Show file tree
Hide file tree
Showing 29 changed files with 42 additions and 42 deletions.
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ android {
dependencies {
ext.emarsys_sdk_version = '3.7.5'
ext.junit_version = '4.13.2'
ext.kotlintest_version = '3.4.2'
ext.kotest_version = '5.9.1'
ext.mockk_version = '1.13.9'

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
Expand All @@ -65,7 +65,7 @@ dependencies {
api "com.emarsys:emarsys-huawei:$emarsys_sdk_version"

testImplementation "junit:junit:$junit_version"
testImplementation "io.kotlintest:kotlintest-runner-junit4:$kotlintest_version"
testImplementation "io.kotest:kotest-runner-junit4:$kotest_version"
testImplementation "io.mockk:mockk:$mockk_version"
testImplementation 'org.json:json:20240303'
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import com.emarsys.emarsys_sdk.command.mobileengage.push.SetPushTokenCommand
import com.emarsys.emarsys_sdk.command.predict.*
import com.emarsys.emarsys_sdk.command.setup.InitializeCommand
import com.emarsys.emarsys_sdk.command.setup.SetupCommand
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.mockk
import org.junit.Before
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.emarsys.emarsys_sdk.command.config

import com.emarsys.Emarsys
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.every
import io.mockk.mockkStatic
import io.mockk.unmockkStatic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.emarsys.emarsys_sdk.command.config

import com.emarsys.Emarsys
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.every
import io.mockk.mockkStatic
import io.mockk.unmockkStatic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.emarsys.emarsys_sdk.command.config

import com.emarsys.Emarsys
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.every
import io.mockk.mockkStatic
import io.mockk.unmockkStatic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.emarsys.emarsys_sdk.command.config

import com.emarsys.Emarsys
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.every
import io.mockk.mockkStatic
import io.mockk.unmockkStatic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.emarsys.emarsys_sdk.command.config

import com.emarsys.Emarsys
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.every
import io.mockk.mockkStatic
import io.mockk.unmockkStatic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.emarsys.emarsys_sdk.command.config
import com.emarsys.Emarsys
import com.emarsys.core.api.notification.ChannelSettings
import com.emarsys.core.api.notification.NotificationSettings
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.*
import org.junit.After
import org.junit.Before
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.emarsys.emarsys_sdk.command.config

import com.emarsys.Emarsys
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.every
import io.mockk.mockkStatic
import io.mockk.unmockkStatic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package com.emarsys.emarsys_sdk.command.geofence
import com.emarsys.Emarsys
import com.emarsys.emarsys_sdk.command.ResultCallback
import com.emarsys.geofence.GeofenceApi
import io.kotlintest.shouldBe
import io.kotlintest.shouldNotBe
import io.kotest.matchers.shouldBe
import io.kotest.matchers.shouldNotBe
import io.mockk.Runs
import io.mockk.every
import io.mockk.just
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.emarsys.emarsys_sdk.command.geofence

import com.emarsys.Emarsys
import com.emarsys.geofence.GeofenceApi
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.*
import org.junit.After
import org.junit.Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.emarsys.emarsys_sdk.command.inapp

import com.emarsys.Emarsys
import com.emarsys.inapp.InAppApi
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.*
import org.junit.After
import org.junit.Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.emarsys.emarsys_sdk.command.inapp

import com.emarsys.Emarsys
import com.emarsys.inapp.InAppApi
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.*
import org.junit.After
import org.junit.Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.emarsys.emarsys_sdk.command.inapp

import com.emarsys.Emarsys
import com.emarsys.inapp.InAppApi
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.*
import org.junit.After
import org.junit.Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.emarsys.core.api.result.Try
import com.emarsys.emarsys_sdk.mapper.InboxResultMapper
import com.emarsys.mobileengage.api.inbox.InboxResult
import com.emarsys.mobileengage.api.inbox.Message
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.*
import org.junit.After
import org.junit.Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ package com.emarsys.emarsys_sdk.command.mobileengage.push

import com.emarsys.Emarsys
import com.emarsys.push.Push
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.every
import io.mockk.mockk
import io.mockk.mockkStatic
import io.mockk.unmockkStatic
import io.mockk.verify
import org.junit.After
import org.junit.Before
import org.junit.Test
import org.junit.jupiter.api.Assertions.*

internal class GetPushTokenCommandTest {
private companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import com.emarsys.core.api.result.CompletionListener
import com.emarsys.emarsys_sdk.command.ResultCallback
import com.emarsys.emarsys_sdk.storage.PushTokenStorage
import com.emarsys.push.PushApi
import io.kotlintest.shouldBe
import io.kotlintest.shouldNotBe
import io.kotest.matchers.shouldBe
import io.kotest.matchers.shouldNotBe
import io.mockk.Runs
import io.mockk.every
import io.mockk.just
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import android.content.Context
import com.emarsys.core.util.AndroidVersionUtils
import com.emarsys.emarsys_sdk.command.ResultCallback
import com.emarsys.emarsys_sdk.notification.NotificationChannelFactory
import io.kotlintest.shouldBe
import io.kotlintest.shouldNotBe
import io.kotest.matchers.shouldBe
import io.kotest.matchers.shouldNotBe
import io.mockk.called
import io.mockk.every
import io.mockk.mockk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import com.emarsys.emarsys_sdk.mapper.RecommendationFilterListMapper
import com.emarsys.emarsys_sdk.mapper.RecommendationLogicMapper
import com.emarsys.predict.Predict
import com.emarsys.predict.api.model.*
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.*
import org.junit.After

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ import com.emarsys.emarsys_sdk.command.EmarsysCommand
import com.emarsys.emarsys_sdk.command.ResultCallback
import com.emarsys.predict.api.model.CartItem
import com.emarsys.predict.api.model.PredictCartItem
import io.mockk.*
import io.mockk.Runs
import io.mockk.every
import io.mockk.just
import io.mockk.mockk
import io.mockk.mockkStatic
import io.mockk.unmockkStatic
import io.mockk.verify
import org.junit.After
import org.junit.Before
import org.junit.Test
import org.junit.jupiter.api.Assertions.*

internal class TrackPurchaseCommandTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import com.emarsys.emarsys_sdk.di.tearDownDependencyContainer
import com.emarsys.emarsys_sdk.storage.PushTokenStorage
import com.emarsys.mobileengage.api.event.EventHandler
import com.emarsys.push.PushApi
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.Runs
import io.mockk.clearAllMocks
import io.mockk.every
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.emarsys.emarsys_sdk.mapper
import com.emarsys.mobileengage.api.geofence.Geofence
import com.emarsys.mobileengage.api.geofence.Trigger
import com.emarsys.mobileengage.api.geofence.TriggerType
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import org.json.JSONObject
import org.junit.Before
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.emarsys.emarsys_sdk.mapper
import com.emarsys.mobileengage.api.action.*
import com.emarsys.mobileengage.api.inbox.InboxResult
import com.emarsys.mobileengage.api.inbox.Message
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import org.junit.Assert.*
import org.junit.Before
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.emarsys.emarsys_sdk.mapper

import com.emarsys.predict.api.model.Product
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import org.junit.Before
import org.junit.Test

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.emarsys.emarsys_sdk.mapper

import com.emarsys.predict.api.model.Product
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe

import org.junit.Before
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.emarsys.emarsys_sdk.mapper

import com.emarsys.Emarsys
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import org.junit.Assert.*

import org.junit.Before
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package com.emarsys.emarsys_sdk.mapper

import arrow.core.mapOf
import com.emarsys.predict.api.model.CartItem
import com.emarsys.predict.api.model.Logic
import com.emarsys.predict.api.model.PredictCartItem
import com.emarsys.predict.api.model.RecommendationLogic
import io.kotlintest.shouldBe
import io.mockk.*
import io.kotest.matchers.shouldBe
import io.mockk.mockk
import io.mockk.mockkStatic
import io.mockk.unmockkStatic
import org.junit.After

import org.junit.Before
import org.junit.Test

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package com.emarsys.emarsys_sdk.storage

import android.app.Activity
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.mockk
import org.junit.Before
import org.junit.Test
import org.junit.jupiter.api.Assertions.*
import java.lang.ref.WeakReference

internal class CurrentActivityHolderTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.emarsys.emarsys_sdk.storage

import android.content.SharedPreferences
import io.kotlintest.shouldBe
import io.kotest.matchers.shouldBe
import io.mockk.every
import io.mockk.mockk
import io.mockk.verify
Expand Down

0 comments on commit d99175e

Please sign in to comment.