Using in memory databases for the test cases
This commit is contained in:
+1
-4
@@ -41,15 +41,12 @@ class AddressableTest {
|
||||
@Before
|
||||
fun setup() {
|
||||
val context = ApplicationProvider.getApplicationContext<Context>()
|
||||
context.deleteDatabase("test.db")
|
||||
db = EventStore(context, "test.db", relayUrl = "testUrl")
|
||||
db = EventStore(context, null)
|
||||
}
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
db.close()
|
||||
val context = ApplicationProvider.getApplicationContext<Context>()
|
||||
context.deleteDatabase("test.db")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ class ExpirationTest {
|
||||
@Before
|
||||
fun setup() {
|
||||
val context = ApplicationProvider.getApplicationContext<Context>()
|
||||
db = EventStore(context, null, relayUrl = "testUrl")
|
||||
db = EventStore(context, null)
|
||||
}
|
||||
|
||||
@After
|
||||
|
||||
+1
-4
@@ -56,15 +56,12 @@ class LargeDBTests {
|
||||
@Before
|
||||
fun setup() {
|
||||
val context = ApplicationProvider.getApplicationContext<Context>()
|
||||
context.deleteDatabase("test_large.db")
|
||||
db = EventStore(context, "largeDBTest.db")
|
||||
db = EventStore(context, null)
|
||||
}
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
db.close()
|
||||
val context = ApplicationProvider.getApplicationContext<Context>()
|
||||
context.deleteDatabase("test_large.db")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ class ReplaceableTest {
|
||||
@Before
|
||||
fun setup() {
|
||||
val context = ApplicationProvider.getApplicationContext<Context>()
|
||||
db = EventStore(context, null, relayUrl = "testUrl")
|
||||
db = EventStore(context, null)
|
||||
}
|
||||
|
||||
@After
|
||||
|
||||
Reference in New Issue
Block a user