forked from exercism/java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAcronymTest.java
More file actions
64 lines (53 loc) · 1.71 KB
/
AcronymTest.java
File metadata and controls
64 lines (53 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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, Acronym.generate(phrase));
}
@Ignore
@Test
public void fromOtherTitleCasedPhrases() {
final String phrase = "Ruby on Rails";
final String expected = "ROR";
assertEquals(expected, Acronym.generate(phrase));
}
@Ignore
@Test
public void fromInconsistentlyCasedPhrases() {
final String phrase = "HyperText Markup Language";
final String expected = "HTML";
assertEquals(expected, Acronym.generate(phrase));
}
@Ignore
@Test
public void fromPhrasesWithPunctuation() {
final String phrase = "First In, First Out";
final String expected = "FIFO";
assertEquals(expected, Acronym.generate(phrase));
}
@Ignore
@Test
public void fromOtherPhrasesWithPunctuation() {
final String phrase = "PHP: Hypertext Preprocessor";
final String expected = "PHP";
assertEquals(expected, Acronym.generate(phrase));
}
@Ignore
@Test
public void fromPhrasesWithPunctuationAndSentenceCasing() {
final String phrase = "Complementary metal-oxide semiconductor";
final String expected = "CMOS";
assertEquals(expected, Acronym.generate(phrase));
}
@Ignore
@Test
public void fromPhraseWithSingleLetterWord() {
final String phrase = "Cat in a Hat";
final String expected = "CIAH";
assertEquals(expected, Acronym.generate(phrase));
}
}