I wrote a Unit-test with RobolectricsTestRunner included.
The unit test passed, but with the following warning:
System.logW: No Compatibility callbacks set! Querying change 119147584
All I did in the unit-test, I saved a variable in Shared Preferences. This warning doesn't destroy anything. I was just wondering what it means. Unit-Test:
@RunWith(RobolectricTestRunner::class)
@Config(sdk = [30])
class SharedPreferencesProviderTest {
private lateinit var sharedPreferencesProvider: SharedPreferencesProviderInterface
@Before
fun setup() {
// setup Shared preferences
...
// Shared Preferences Access
...
// clearing Shared Preferences
...
}
@Test
fun firstStart_shouldBeTrueDefaultAndCheckChange() {
// Default check
var firstStart =
sharedPreferencesProvider.getIsFirstStart()
var expected = true
assertTrue(firstStart == expected)
// Check whether it handles changes
sharedPreferencesProvider.setIsFirstStart(false)
firstStart =
sharedPreferencesProvider.getIsFirstStart()
expected = false
assertTrue(firstStart == expected)
}}
I seems like it doesn't trigger OnSharedPreferenceChangeListener anymore, but I'm not sure. source
[WARN] Unknown chunk type '200'.
– Caption