Skip to content

Commit

Permalink
tests: make SUT test-scoped in AndroidDeviceInfoRepositoryTest
Browse files Browse the repository at this point in the history
  • Loading branch information
wzieba committed Dec 5, 2023
1 parent 7533f97 commit 473dc7e
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ private const val MANUFACTURER = "test manufacturer"
@Config(sdk = [SDK_VERSION])
internal class AndroidDeviceInfoRepositoryTest {

private lateinit var sut: AndroidDeviceInfoRepository

@Before
fun setUp() {
ShadowBuild.setManufacturer(MANUFACTURER)
Expand All @@ -26,7 +24,7 @@ internal class AndroidDeviceInfoRepositoryTest {
fun `given the advertisement id exists, when collecting device info, then parsely site uuid is advertisement id`() {
// given
val advertisementId = "ad id"
sut = AndroidDeviceInfoRepository(
val sut = AndroidDeviceInfoRepository(
advertisementIdProvider = { advertisementId },
androidIdProvider = { "android id" })

Expand All @@ -41,7 +39,7 @@ internal class AndroidDeviceInfoRepositoryTest {
fun `given the advertisement is null and android id is not, when collecting device info, then parsely id is android id`() {
// given
val androidId = "android id"
sut = AndroidDeviceInfoRepository(
val sut = AndroidDeviceInfoRepository(
advertisementIdProvider = { null },
androidIdProvider = { androidId }
)
Expand All @@ -56,7 +54,7 @@ internal class AndroidDeviceInfoRepositoryTest {
@Test
fun `given both advertisement id and android id are null, when collecting device info, then parsely id is empty`() {
// given
sut = AndroidDeviceInfoRepository(
val sut = AndroidDeviceInfoRepository(
advertisementIdProvider = { null },
androidIdProvider = { null }
)
Expand Down

0 comments on commit 473dc7e

Please sign in to comment.