Sha256: 212d350e499dbd6cfee9b4d07d018f7bf4924a8a3d7aeb927425d1028c674f5e

Contents?: true

Size: 601 Bytes

Versions: 89

Compression:

Stored size: 601 Bytes

Contents

import org.junit.Test

class SeriesInvalidInputTest {

    @Test(expected = IllegalArgumentException::class)
    fun nonDigitCharacters() {
        Series("1234a5")
    }

    @Test(expected = IllegalArgumentException::class)
    fun negativeSpan() {
        Series("12345").getLargestProduct(-1)
    }

    @Test(expected = IllegalArgumentException::class)
    fun spanLargerThanStringSize() {
        Series("123").getLargestProduct(4)
    }

    @Test(expected = IllegalArgumentException::class)
    fun spanLargerThanStringSizeUsingEmptyString() {
        Series("").getLargestProduct(1)
    }
}

Version data entries

89 entries across 89 versions & 1 rubygems

Version Path
trackler-1.0.4.0 tracks/kotlin/exercises/largest-series-product/src/test/kotlin/SeriesInvalidInputTest.kt
trackler-1.0.3.0 tracks/kotlin/exercises/largest-series-product/src/test/kotlin/SeriesInvalidInputTest.kt
trackler-1.0.2.1 tracks/kotlin/exercises/largest-series-product/src/test/kotlin/SeriesInvalidInputTest.kt
trackler-1.0.2.0 tracks/kotlin/exercises/largest-series-product/src/test/kotlin/SeriesInvalidInputTest.kt
trackler-1.0.1.2 tracks/kotlin/exercises/largest-series-product/src/test/kotlin/SeriesInvalidInputTest.kt
trackler-1.0.1.1 tracks/kotlin/exercises/largest-series-product/src/test/kotlin/SeriesInvalidInputTest.kt
trackler-1.0.1.0 tracks/kotlin/exercises/largest-series-product/src/test/kotlin/SeriesInvalidInputTest.kt
trackler-1.0.0.1 tracks/kotlin/exercises/largest-series-product/src/test/kotlin/SeriesInvalidInputTest.kt
trackler-1.0.0 tracks/kotlin/exercises/largest-series-product/src/test/kotlin/SeriesInvalidInputTest.kt