Sha256: 2962fa502417fbaadc5bb98cc1c911fb7f5e698ef97a0cf62d14937c33282037

Contents?: true

Size: 1.3 KB

Versions: 181

Compression:

Stored size: 1.3 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 fromInconsistentlyCasedPhrases() {
        val phrase = "HyperText Markup Language"
        val expected = "HTML"
        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 fromOtherPhrasesWithPunctuation() {
        val phrase = "PHP: Hypertext Preprocessor"
        val expected = "PHP"
        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

181 entries across 181 versions & 1 rubygems

Version Path
trackler-2.2.1.52 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.51 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.50 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.49 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.48 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.47 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.46 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.45 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.44 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.43 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.42 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.41 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.40 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.39 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.38 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.37 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.36 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.35 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.34 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt
trackler-2.2.1.33 tracks/kotlin/exercises/acronym/src/test/kotlin/AcronymTest.kt