package net.pokeranalytics.android

import net.pokeranalytics.android.util.extensions.kmbFormatted
import org.junit.Assert
import org.junit.Test

class BasicUnitTest : RealmUnitTest() {

    @Test
    fun testStats() {
        Assert.assertEquals(0, 0)
    }

    @Test
    fun testFormatting() {

        val n1 = 100.0
        val n2 = 1000.0
        val n3 = n2 * n2 // 1M
        val n4 = n3 * n2 // 1B

        val s1 = n1.kmbFormatted()
        val s2 = n2.kmbFormatted()
        val s2b = n2.kmbFormatted(1000.0)
        val s3 = n3.kmbFormatted()
        val s4 = n4.kmbFormatted()

        Assert.assertEquals("100", s1)
//        Assert.assertEquals("1/e000", s2) // weird error Expected :1 000, Actual   :1 000
        Assert.assertEquals("1K", s2b)
        Assert.assertEquals("1M", s3)
        Assert.assertEquals("1B", s4)

    }

}
