|
5 | 5 |
|
6 | 6 | public class AcronymTest {
|
7 | 7 |
|
8 |
| - |
9 | 8 | @Test
|
10 | 9 | public void fromTitleCasedPhrases() {
|
11 | 10 | final String phrase = "Portable Network Graphics";
|
12 | 11 | final String expected = "PNG";
|
13 |
| - assertEquals(expected, Acronym.generate(phrase)); |
| 12 | + assertEquals(expected, new Acronym(phrase).getAcronym()); |
14 | 13 | }
|
15 | 14 |
|
16 | 15 | @Ignore
|
17 | 16 | @Test
|
18 | 17 | public void fromOtherTitleCasedPhrases() {
|
19 | 18 | final String phrase = "Ruby on Rails";
|
20 | 19 | final String expected = "ROR";
|
21 |
| - assertEquals(expected, Acronym.generate(phrase)); |
| 20 | + assertEquals(expected, new Acronym(phrase).getAcronym()); |
22 | 21 | }
|
23 | 22 |
|
24 | 23 | @Ignore
|
25 | 24 | @Test
|
26 | 25 | public void fromInconsistentlyCasedPhrases() {
|
27 | 26 | final String phrase = "HyperText Markup Language";
|
28 | 27 | final String expected = "HTML";
|
29 |
| - assertEquals(expected, Acronym.generate(phrase)); |
| 28 | + assertEquals(expected, new Acronym(phrase).getAcronym()); |
30 | 29 | }
|
31 | 30 |
|
32 | 31 | @Ignore
|
33 | 32 | @Test
|
34 | 33 | public void fromPhrasesWithPunctuation() {
|
35 | 34 | final String phrase = "First In, First Out";
|
36 | 35 | final String expected = "FIFO";
|
37 |
| - assertEquals(expected, Acronym.generate(phrase)); |
| 36 | + assertEquals(expected, new Acronym(phrase).getAcronym()); |
38 | 37 | }
|
39 | 38 |
|
40 | 39 | @Ignore
|
41 | 40 | @Test
|
42 | 41 | public void fromOtherPhrasesWithPunctuation() {
|
43 | 42 | final String phrase = "PHP: Hypertext Preprocessor";
|
44 | 43 | final String expected = "PHP";
|
45 |
| - assertEquals(expected, Acronym.generate(phrase)); |
| 44 | + assertEquals(expected, new Acronym(phrase).getAcronym()); |
46 | 45 | }
|
47 | 46 |
|
48 | 47 | @Ignore
|
49 | 48 | @Test
|
50 | 49 | public void fromPhrasesWithNonAcronymAllCapsWord() {
|
51 | 50 | final String phrase = "GNU Image Manipulation Program";
|
52 | 51 | final String expected = "GIMP";
|
53 |
| - assertEquals(expected, Acronym.generate(phrase)); |
| 52 | + assertEquals(expected, new Acronym(phrase).getAcronym()); |
54 | 53 | }
|
55 | 54 |
|
56 | 55 | @Ignore
|
57 | 56 | @Test
|
58 | 57 | public void fromPhrasesWithPunctuationAndSentenceCasing() {
|
59 | 58 | final String phrase = "Complementary metal-oxide semiconductor";
|
60 | 59 | final String expected = "CMOS";
|
61 |
| - assertEquals(expected, Acronym.generate(phrase)); |
| 60 | + assertEquals(expected, new Acronym(phrase).getAcronym()); |
62 | 61 | }
|
63 | 62 |
|
64 | 63 | @Ignore
|
65 | 64 | @Test
|
66 | 65 | public void fromPhraseWithSingleLetterWord() {
|
67 | 66 | final String phrase = "Cat in a Hat";
|
68 | 67 | final String expected = "CIAH";
|
69 |
| - assertEquals(expected, Acronym.generate(phrase)); |
| 68 | + assertEquals(expected, new Acronym(phrase).getAcronym()); |
70 | 69 | }
|
71 | 70 |
|
72 | 71 | }
|
0 commit comments