Sha256: 8b989d3c9038f22f373ea9c4205776bfad1691ef55d8602e2fc2a17389973f99

Contents?: true

Size: 787 Bytes

Versions: 89

Compression:

Stored size: 787 Bytes

Contents

import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
import kotlin.test.assertEquals

@RunWith(Parameterized::class)
class ScrabbleScoreTest(val input: String, val expectedOutput: Int) {

    companion object {
        @JvmStatic
        @Parameterized.Parameters(name = "{index}: scoreWord({0})={1}")
        fun data() = listOf(
                arrayOf("", 0),
                arrayOf(" \t\n", 0),
                arrayOf("a", 1),
                arrayOf("f", 4),
                arrayOf("street", 6),
                arrayOf("quirky", 22),
                arrayOf("OXYPHENBUTAZONE", 41),
                arrayOf("alacrity", 13)
        )
    }

    @Test
    fun test() {
        assertEquals(expectedOutput, Scrabble.scoreWord(input))
    }
}

Version data entries

89 entries across 89 versions & 1 rubygems

Version Path
trackler-2.0.6.33 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.32 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.31 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.30 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.29 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.28 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.27 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.26 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.25 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.24 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.23 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.22 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.21 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.20 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.19 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.18 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.17 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.16 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.15 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt
trackler-2.0.6.14 tracks/kotlin/exercises/scrabble-score/src/test/kotlin/ScrabbleScoreTest.kt