Add view model tests

This commit is contained in:
Sylwester Zieliński
2022-01-28 15:09:51 +01:00
parent d3fca87c45
commit 11372953ee
57 changed files with 781 additions and 437 deletions

View File

@@ -1,22 +0,0 @@
package no.nordicsemi.android.utils
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
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("no.nordicsemi.android.utils.test", appContext.packageName)
}
}

View File

@@ -1,16 +0,0 @@
package no.nordicsemi.android.utils
import org.junit.Assert.*
import org.junit.Test
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}