Sha256: dafddc48ad681190faed6f94e262ca931b50c4f4667e23f2fb7e11dc32c93635

Contents?: true

Size: 1.67 KB

Versions: 126

Compression:

Stored size: 1.67 KB

Contents

import org.junit.Test
import org.junit.Ignore
import kotlin.test.assertEquals

class ETLTest {

    @Test
    fun aSingleLetter() {
        val old = mapOf(1 to listOf('A'))
        val expected = mapOf('a' to 1)

        assertEquals(expected, ETL.transform(old))
    }

    @Ignore
    @Test
    fun singleScoreWithMultipleLetters() {
        val old = mapOf(1 to listOf('A', 'E', 'I', 'O', 'U'))
        val expected = mapOf('a' to 1, 'e' to 1, 'i' to 1, 'o' to 1, 'u' to 1)

        assertEquals(expected, ETL.transform(old))
    }

    @Ignore
    @Test
    fun multipleScoresWithMultipleLetters() {
        val old = mapOf(1 to listOf('A', 'E'), 2 to listOf('D', 'G'))
        val expected = mapOf('a' to 1, 'd' to 2, 'e' to 1, 'g' to 2)

        assertEquals(expected, ETL.transform(old))
    }

    @Ignore
    @Test
    fun multipleScoresWithDifferingNumbersOfLetters() {
        val old = mapOf(
                1 to listOf('A', 'E', 'I', 'O', 'U', 'L', 'N', 'R', 'S', 'T'),
                2 to listOf('D', 'G'),
                3 to listOf('B', 'C', 'M', 'P'),
                4 to listOf('F', 'H', 'V', 'W', 'Y'),
                5 to listOf('K'),
                8 to listOf('J', 'X'),
                10 to listOf('Q', 'Z')
        )
        val expected = mapOf(
                'a' to 1, 'b' to 3, 'c' to 3, 'd' to 2, 'e' to 1,
                'f' to 4, 'g' to 2, 'h' to 4, 'i' to 1, 'j' to 8,
                'k' to 5, 'l' to 1, 'm' to 3, 'n' to 1, 'o' to 1,
                'p' to 3, 'q' to 10, 'r' to 1, 's' to 1, 't' to 1,
                'u' to 1, 'v' to 4, 'w' to 4, 'x' to 8, 'y' to 4,
                'z' to 10
        )

        assertEquals(expected, ETL.transform(old))
    }

}

Version data entries

126 entries across 126 versions & 1 rubygems

Version Path
trackler-2.2.1.98 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.97 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.96 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.95 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.94 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.93 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.92 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.91 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.90 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.89 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.88 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.87 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.86 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.85 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.84 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.83 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.82 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.81 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.80 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt
trackler-2.2.1.79 tracks/kotlin/exercises/etl/src/test/kotlin/ETLTest.kt