mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-25 04:06:14 +00:00
Allow RemoteConfig to be lazily initialized.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.thoughtcrime.securesms.util
|
||||
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import kotlin.reflect.KProperty1
|
||||
import kotlin.reflect.KVisibility
|
||||
@@ -10,6 +11,11 @@ import kotlin.reflect.full.memberProperties
|
||||
*/
|
||||
class RemoteConfig_StaticValuesTest {
|
||||
|
||||
@Before
|
||||
fun setup() {
|
||||
RemoteConfig.initialized = true
|
||||
}
|
||||
|
||||
/**
|
||||
* This test cycles the REMOTE_VALUES through a bunch of different inputs, then looks at all of the public getters and checks to see if they return different
|
||||
* values when the inputs change. If they don't, then it's likely that the getter is returning a static value, which was likely introduced during testing
|
||||
@@ -34,6 +40,7 @@ class RemoteConfig_StaticValuesTest {
|
||||
val configKeys = RemoteConfig.configsByKey.keys
|
||||
|
||||
val ignoreList = setOf(
|
||||
"initialized",
|
||||
"REMOTE_VALUES",
|
||||
"configsByKey",
|
||||
"debugMemoryValues",
|
||||
|
||||
Reference in New Issue
Block a user