Sha256: 1f0b54a04f54a5c5e0dfbade60161b765efc7975b359cff3a6cae5505e07ce72

Contents?: true

Size: 1.64 KB

Versions: 89

Compression:

Stored size: 1.64 KB

Contents

import org.junit.Test;
import org.junit.Ignore;

import static org.junit.Assert.assertEquals;

/*
 * version: 1.1.0
 */
public class AcronymTest {

    @Test
    public void fromTitleCasedPhrases() {
        final String phrase = "Portable Network Graphics";
        final String expected = "PNG";
        assertEquals(expected, new Acronym(phrase).get());
    }

    @Ignore("Remove to run test")
    @Test
    public void fromOtherTitleCasedPhrases() {
        final String phrase = "Ruby on Rails";
        final String expected = "ROR";
        assertEquals(expected, new Acronym(phrase).get());
    }

    @Ignore("Remove to run test")
    @Test
    public void fromPhrasesWithPunctuation() {
        final String phrase = "First In, First Out";
        final String expected = "FIFO";
        assertEquals(expected, new Acronym(phrase).get());
    }

    @Ignore("Remove to run test")
    @Test
    public void fromOtherPhrasesWithPunctuation() {
        final String phrase = "PHP: Hypertext Preprocessor";
        final String expected = "PHP";
        assertEquals(expected, new Acronym(phrase).get());
    }

    @Ignore("Remove to run test")
    @Test
    public void fromPhrasesWithNonAcronymAllCapsWord() {
        final String phrase = "GNU Image Manipulation Program";
        final String expected = "GIMP";
        assertEquals(expected, new Acronym(phrase).get());
    }

    @Ignore("Remove to run test")
    @Test
    public void fromPhrasesWithPunctuationAndSentenceCasing() {
        final String phrase = "Complementary metal-oxide semiconductor";
        final String expected = "CMOS";
        assertEquals(expected, new Acronym(phrase).get());
    }

}

Version data entries

89 entries across 89 versions & 1 rubygems

Version Path
trackler-2.2.1.5 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.2.1.4 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.2.1.3 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.2.1.2 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.2.1.1 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.2.1.0 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.2.0.6 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.2.0.5 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.2.0.4 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.2.0.3 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.2.0.2 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.2.0.1 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.2.0.0 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.1.0.55 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.1.0.54 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.1.0.53 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.1.0.52 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.1.0.51 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.1.0.50 tracks/java/exercises/acronym/src/test/java/AcronymTest.java
trackler-2.1.0.49 tracks/java/exercises/acronym/src/test/java/AcronymTest.java