|
|
|
@ -1,7 +1,6 @@ |
|
|
|
package net.pokeranalytics.android |
|
|
|
package net.pokeranalytics.android |
|
|
|
|
|
|
|
|
|
|
|
import io.realm.Realm |
|
|
|
import io.realm.Realm |
|
|
|
import io.realm.RealmConfiguration |
|
|
|
|
|
|
|
import org.junit.After |
|
|
|
import org.junit.After |
|
|
|
import org.junit.Before |
|
|
|
import org.junit.Before |
|
|
|
|
|
|
|
|
|
|
|
@ -11,15 +10,15 @@ open class RealmUnitTest { |
|
|
|
|
|
|
|
|
|
|
|
@Before |
|
|
|
@Before |
|
|
|
fun setup() { |
|
|
|
fun setup() { |
|
|
|
val testConfig = RealmConfiguration.Builder().inMemory().name("test-realm").build() |
|
|
|
// val testConfig = RealmConfiguration.Builder().inMemory().name("test-realm").build() |
|
|
|
Realm.setDefaultConfiguration(testConfig) |
|
|
|
// Realm.setDefaultConfiguration(testConfig) |
|
|
|
mockRealm = Realm.getDefaultInstance() |
|
|
|
// mockRealm = Realm.getDefaultInstance() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@After |
|
|
|
@After |
|
|
|
@Throws(Exception::class) |
|
|
|
@Throws(Exception::class) |
|
|
|
public fun tearDown() { |
|
|
|
public fun tearDown() { |
|
|
|
mockRealm.close() |
|
|
|
// mockRealm.close() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |