|
|
|
@ -1,32 +1,9 @@ |
|
|
|
package net.pokeranalytics.android |
|
|
|
package net.pokeranalytics.android |
|
|
|
|
|
|
|
|
|
|
|
import io.realm.Realm |
|
|
|
|
|
|
|
import io.realm.log.RealmLog |
|
|
|
|
|
|
|
import net.pokeranalytics.android.model.realm.Session |
|
|
|
|
|
|
|
import org.junit.After |
|
|
|
|
|
|
|
import org.junit.Assert.assertThat |
|
|
|
|
|
|
|
import org.junit.Before |
|
|
|
|
|
|
|
import org.junit.Rule |
|
|
|
|
|
|
|
import org.junit.Test |
|
|
|
|
|
|
|
import org.junit.runner.RunWith |
|
|
|
|
|
|
|
import org.powermock.api.mockito.PowerMockito |
|
|
|
|
|
|
|
import org.powermock.api.mockito.PowerMockito.`when` |
|
|
|
|
|
|
|
import org.powermock.api.mockito.PowerMockito.mockStatic |
|
|
|
|
|
|
|
import org.powermock.core.classloader.annotations.PowerMockIgnore |
|
|
|
|
|
|
|
import org.powermock.core.classloader.annotations.PrepareForTest |
|
|
|
|
|
|
|
import org.powermock.core.classloader.annotations.SuppressStaticInitializationFor |
|
|
|
|
|
|
|
import org.powermock.modules.junit4.rule.PowerMockRule |
|
|
|
|
|
|
|
import org.robolectric.RobolectricTestRunner |
|
|
|
|
|
|
|
import org.robolectric.annotation.Config |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RunWith(RobolectricTestRunner::class) |
|
|
|
|
|
|
|
@Config(manifest = Config.NONE, sdk = [19]) |
|
|
|
|
|
|
|
@PowerMockIgnore("org.mockito.*", "org.robolectric.*", "android.*") |
|
|
|
|
|
|
|
@SuppressStaticInitializationFor("io.realm.internal.Util") |
|
|
|
|
|
|
|
@PrepareForTest(Realm::class, RealmLog::class) |
|
|
|
|
|
|
|
open class RealmUnitTest { |
|
|
|
open class RealmUnitTest { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
@get:Rule |
|
|
|
@get:Rule |
|
|
|
var rule = PowerMockRule() |
|
|
|
var rule = PowerMockRule() |
|
|
|
|
|
|
|
|
|
|
|
@ -55,5 +32,6 @@ open class RealmUnitTest { |
|
|
|
fun tearDown() { |
|
|
|
fun tearDown() { |
|
|
|
mockRealm.close() |
|
|
|
mockRealm.close() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |