Sha256: 0da3c4e332dada20090c44db1dbc00a949676426a8ef58dba0e92f8861601dc5

Contents?: true

Size: 1.28 KB

Versions: 126

Compression:

Stored size: 1.28 KB

Contents

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

class AcronymTest {

    @Test
    fun fromTitleCasedPhrases() {
        val phrase = "Portable Network Graphics"
        val expected = "PNG"
        assertEquals(expected, Acronym.generate(phrase))
    }

    @Ignore
    @Test
    fun fromOtherTitleCasedPhrases() {
        val phrase = "Ruby on Rails"
        val expected = "ROR"
        assertEquals(expected, Acronym.generate(phrase))
    }

    @Ignore
    @Test
    fun fromPhrasesWithPunctuation() {
        val phrase = "First In, First Out"
        val expected = "FIFO"
        assertEquals(expected, Acronym.generate(phrase))
    }

    @Ignore
    @Test
    fun fromAllCapsWord() {
        val phrase = "PHP: Hypertext Preprocessor"
        val expected = "PHP"
        assertEquals(expected, Acronym.generate(phrase))
    }

    @Ignore
    @Test
    fun fromNonAcronymAllCapsWord() {
        val phrase = "GNU Image Manipulation Program"
        val expected = "GIMP"
        assertEquals(expected, Acronym.generate(phrase))
    }

    @Ignore
    @Test
    fun fromPhrasesWithPunctuationAndSentenceCasing() {
        val phrase = "Complementary metal-oxide semiconductor"
        val expected = "CMOS"
        assertEquals(expected, Acronym.generate(phrase))
    }

}

Version data entries

126 entries across 126 versions & 1 rubygems

Version Path
trackler-2.2.1.139 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.138 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.137 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.136 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.135 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.134 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.133 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.132 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.131 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.130 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.129 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.128 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.127 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.126 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.125 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.124 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.123 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.122 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.121 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.120 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt