Skip to content

Commit 473dc7e

Browse files
committed
tests: make SUT test-scoped in AndroidDeviceInfoRepositoryTest
1 parent 7533f97 commit 473dc7e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

parsely/src/test/java/com/parsely/parselyandroid/AndroidDeviceInfoRepositoryTest.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ private const val MANUFACTURER = "test manufacturer"
1515
@Config(sdk = [SDK_VERSION])
1616
internal class AndroidDeviceInfoRepositoryTest {
1717

18-
private lateinit var sut: AndroidDeviceInfoRepository
19-
2018
@Before
2119
fun setUp() {
2220
ShadowBuild.setManufacturer(MANUFACTURER)
@@ -26,7 +24,7 @@ internal class AndroidDeviceInfoRepositoryTest {
2624
fun `given the advertisement id exists, when collecting device info, then parsely site uuid is advertisement id`() {
2725
// given
2826
val advertisementId = "ad id"
29-
sut = AndroidDeviceInfoRepository(
27+
val sut = AndroidDeviceInfoRepository(
3028
advertisementIdProvider = { advertisementId },
3129
androidIdProvider = { "android id" })
3230

@@ -41,7 +39,7 @@ internal class AndroidDeviceInfoRepositoryTest {
4139
fun `given the advertisement is null and android id is not, when collecting device info, then parsely id is android id`() {
4240
// given
4341
val androidId = "android id"
44-
sut = AndroidDeviceInfoRepository(
42+
val sut = AndroidDeviceInfoRepository(
4543
advertisementIdProvider = { null },
4644
androidIdProvider = { androidId }
4745
)
@@ -56,7 +54,7 @@ internal class AndroidDeviceInfoRepositoryTest {
5654
@Test
5755
fun `given both advertisement id and android id are null, when collecting device info, then parsely id is empty`() {
5856
// given
59-
sut = AndroidDeviceInfoRepository(
57+
val sut = AndroidDeviceInfoRepository(
6058
advertisementIdProvider = { null },
6159
androidIdProvider = { null }
6260
)

0 commit comments

Comments
 (0)