Skip to content

Commit a8bf090

Browse files
committed
Add missing tests to Pangram.
- ensure titles of tests match those in https://github.com/exercism/x-common/blob/master/exercises/pangram/canonical-data.json
1 parent a06693f commit a8bf090

1 file changed

Lines changed: 34 additions & 4 deletions

File tree

‎exercises/pangram/src/test/java/PangramTest.java‎

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ public class PangramTest {
88

99

1010
@Test
11-
public void emptySentence() {
11+
public void sentenceEmpty() {
1212
assertFalse(Pangrams.isPangram(""));
1313
}
1414

1515
@Ignore
1616
@Test
17-
public void testLowercasePangram() {
17+
public void pangramWithOnlyLowerCase() {
1818
assertTrue(Pangrams.isPangram("the quick brown fox jumps over the lazy dog"));
1919
}
2020

@@ -26,14 +26,44 @@ public void missingCharacterX() {
2626

2727
@Ignore
2828
@Test
29-
public void mixedCaseAndPunctuation() {
29+
public void anotherMissingCharacterX() {
30+
assertFalse(Pangrams.isPangram("the quick brown fish jumps over the lazy dog"));
31+
}
32+
33+
@Ignore
34+
@Test
35+
public void pangramWithUnderscores() {
36+
assertTrue(Pangrams.isPangram("\"the_quick_brown_fox_jumps_over_the_lazy_dog\""));
37+
}
38+
39+
@Ignore
40+
@Test
41+
public void pangramWithNumbers() {
42+
assertTrue(Pangrams.isPangram("\"the 1 quick brown fox jumps over the 2 lazy dogs\""));
43+
}
44+
45+
@Ignore
46+
@Test
47+
public void missingLettersReplacedByNumbers() {
48+
assertFalse(Pangrams.isPangram("\"7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog\""));
49+
}
50+
51+
@Ignore
52+
@Test
53+
public void pangramWithMixedCaseAndPunctuation() {
3054
assertTrue(Pangrams.isPangram("\"Five quacking Zephyrs jolt my wax bed.\""));
3155
}
3256

3357
@Ignore
3458
@Test
35-
public void nonAsciiCharacters() {
59+
public void pangramWithNonAsciiCharacters() {
3660
assertTrue(Pangrams.isPangram("Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich."));
3761
}
3862

63+
64+
@Ignore
65+
@Test
66+
public void panagramInAlphabetOtherThanAscii() {
67+
assertFalse(Pangrams.isPangram("Широкая электрификация южных губерний даст мощный толчок подъёму сельского хозяйства."));
68+
}
3969
}

0 commit comments

Comments
 (0)