package net.pokeranalytics.android

import io.realm.Realm
import io.realm.RealmConfiguration
import org.junit.After
import org.junit.Before

open class RealmInstrumentedUnitTest {

    lateinit var mockRealm: Realm

    @Before
    fun setup() {

        val testConfig = RealmConfiguration.Builder().inMemory().name("test-realm").build()
        Realm.setDefaultConfiguration(testConfig)
        mockRealm = Realm.getDefaultInstance()
    }

    @After
    @Throws(Exception::class)
    public fun tearDown() {
        mockRealm.close()
    }

}