Sha256: 1e596aacde8cd8e9363ef05d00a62c53e9aa4b15f25e19f5869b8d944e6e2e8d
Contents?: true
Size: 1.96 KB
Versions: 33
Compression:
Stored size: 1.96 KB
Contents
import org.junit.Test; import org.junit.Ignore; import static org.junit.Assert.assertEquals; public class AcronymTest { @Test public void fromTitleCasedPhrases() { final String phrase = "Portable Network Graphics"; final String expected = "PNG"; assertEquals(expected, new Acronym(phrase).get()); } @Ignore @Test public void fromOtherTitleCasedPhrases() { final String phrase = "Ruby on Rails"; final String expected = "ROR"; assertEquals(expected, new Acronym(phrase).get()); } @Ignore @Test public void fromInconsistentlyCasedPhrases() { final String phrase = "HyperText Markup Language"; final String expected = "HTML"; assertEquals(expected, new Acronym(phrase).get()); } @Ignore @Test public void fromPhrasesWithPunctuation() { final String phrase = "First In, First Out"; final String expected = "FIFO"; assertEquals(expected, new Acronym(phrase).get()); } @Ignore @Test public void fromOtherPhrasesWithPunctuation() { final String phrase = "PHP: Hypertext Preprocessor"; final String expected = "PHP"; assertEquals(expected, new Acronym(phrase).get()); } @Ignore @Test public void fromPhrasesWithNonAcronymAllCapsWord() { final String phrase = "GNU Image Manipulation Program"; final String expected = "GIMP"; assertEquals(expected, new Acronym(phrase).get()); } @Ignore @Test public void fromPhrasesWithPunctuationAndSentenceCasing() { final String phrase = "Complementary metal-oxide semiconductor"; final String expected = "CMOS"; assertEquals(expected, new Acronym(phrase).get()); } @Ignore @Test public void fromPhraseWithSingleLetterWord() { final String phrase = "Cat in a Hat"; final String expected = "CIAH"; assertEquals(expected, new Acronym(phrase).get()); } }
Version data entries
33 entries across 33 versions & 1 rubygems