Last active
December 19, 2019 01:03
-
-
Save phellipealexandre/7f29241ce634296ae6c22b99adc7cd80 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.test.core.app.ApplicationProvider | |
@RunWith(AndroidJUnit4::class) | |
class DatabaseTest { | |
private lateinit var database: MainDatabase | |
@Before | |
fun setUp() { | |
val context = ApplicationProvider.getApplicationContext<Context>() | |
database = Room.inMemoryDatabaseBuilder(context, MainDatabase::class.java).build() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment