settings: decouple
Decouple the settings god object into feature-specific settings. This should make testing settings-dependent code much easier, as it no longer requires a context.
This commit is contained in:
@@ -18,7 +18,9 @@
|
||||
package org.oxycblt.auxio
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
/**
|
||||
@@ -28,5 +30,10 @@ import org.junit.runner.RunWith
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class StubTest {
|
||||
// TODO: Add tests
|
||||
// TODO: Make tests
|
||||
@Test
|
||||
fun useAppContext() {
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("org.oxycblt.auxio", appContext.packageName)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user