Skip to content

Commit 2717f41

Browse files
authored
Removed redundant lazy. (#392)
1 parent 65cca83 commit 2717f41

1 file changed

Lines changed: 12 additions & 17 deletions

File tree

  • architecture/instrumentation-test/src/main/java/com/mitteloupe/whoami/test/test

architecture/instrumentation-test/src/main/java/com/mitteloupe/whoami/test/test/BaseTest.kt

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,28 +59,23 @@ abstract class BaseTest {
5959
@Inject
6060
lateinit var composeIdlingResources: @JvmSuppressWildcards Collection<ComposeIdlingResource>
6161

62-
private val webServerRule by lazy {
63-
WebServerRule(
64-
lazy { listOf(mockDispatcher) },
65-
lazy { responseStore }
66-
) { mockWebServerProvider.serverUrl }
67-
}
62+
private val webServerRule = WebServerRule(
63+
lazy { listOf(mockDispatcher) },
64+
lazy { responseStore }
65+
) { mockWebServerProvider.serverUrl }
6866

69-
private val localStoreRule by lazy {
70-
LocalStoreRule(
71-
lazy { sharedPreferences },
72-
lazy { keyValueStore }
73-
)
74-
}
67+
private val localStoreRule = LocalStoreRule(
68+
lazy { sharedPreferences },
69+
lazy { keyValueStore }
70+
)
71+
72+
protected abstract val composeTestRule: ComposeContentTestRule
7573

76-
abstract val composeTestRule: ComposeContentTestRule
74+
@SuppressLint("UnsafeOptInUsageError")
75+
private val grantPermissionRule = SdkAwareGrantPermissionRule.grant(WRITE_EXTERNAL_STORAGE)
7776

7877
@get:Rule
7978
val testRules: RuleChain by lazy {
80-
@SuppressLint("UnsafeOptInUsageError")
81-
val grantPermissionRule = SdkAwareGrantPermissionRule.grant(
82-
WRITE_EXTERNAL_STORAGE
83-
)
8479
RuleChain
8580
.outerRule(hiltAndroidRule)
8681
.around(DisableAnimationsRule())

0 commit comments

Comments
 (0)