Skip to content

Commit c78a95c

Browse files
Add pangram
1 parent ab49715 commit c78a95c

File tree

3 files changed

+22
-15
lines changed

3 files changed

+22
-15
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using Xunit;
2+
3+
public class PangramTests
4+
{
5+
{{#test_cases}}
6+
[Fact{{#unless @first}}(Skip = "Remove this Skip property to run this test"){{/unless}}]
7+
public void {{method_name path}}()
8+
{
9+
Assert.{{expected}}(Pangram.IsPangram({{input.sentence}}));
10+
}
11+
{{/test_cases}}
12+
}

exercises/practice/pangram/PangramTests.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,61 +3,61 @@
33
public class PangramTests
44
{
55
[Fact]
6-
public void Empty_sentence()
6+
public void EmptySentence()
77
{
88
Assert.False(Pangram.IsPangram(""));
99
}
1010

1111
[Fact(Skip = "Remove this Skip property to run this test")]
12-
public void Perfect_lower_case()
12+
public void PerfectLowerCase()
1313
{
1414
Assert.True(Pangram.IsPangram("abcdefghijklmnopqrstuvwxyz"));
1515
}
1616

1717
[Fact(Skip = "Remove this Skip property to run this test")]
18-
public void Only_lower_case()
18+
public void OnlyLowerCase()
1919
{
2020
Assert.True(Pangram.IsPangram("the quick brown fox jumps over the lazy dog"));
2121
}
2222

2323
[Fact(Skip = "Remove this Skip property to run this test")]
24-
public void Missing_the_letter_x()
24+
public void MissingTheLetterX()
2525
{
2626
Assert.False(Pangram.IsPangram("a quick movement of the enemy will jeopardize five gunboats"));
2727
}
2828

2929
[Fact(Skip = "Remove this Skip property to run this test")]
30-
public void Missing_the_letter_h()
30+
public void MissingTheLetterH()
3131
{
3232
Assert.False(Pangram.IsPangram("five boxing wizards jump quickly at it"));
3333
}
3434

3535
[Fact(Skip = "Remove this Skip property to run this test")]
36-
public void With_underscores()
36+
public void WithUnderscores()
3737
{
3838
Assert.True(Pangram.IsPangram("the_quick_brown_fox_jumps_over_the_lazy_dog"));
3939
}
4040

4141
[Fact(Skip = "Remove this Skip property to run this test")]
42-
public void With_numbers()
42+
public void WithNumbers()
4343
{
4444
Assert.True(Pangram.IsPangram("the 1 quick brown fox jumps over the 2 lazy dogs"));
4545
}
4646

4747
[Fact(Skip = "Remove this Skip property to run this test")]
48-
public void Missing_letters_replaced_by_numbers()
48+
public void MissingLettersReplacedByNumbers()
4949
{
5050
Assert.False(Pangram.IsPangram("7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog"));
5151
}
5252

5353
[Fact(Skip = "Remove this Skip property to run this test")]
54-
public void Mixed_case_and_punctuation()
54+
public void MixedCaseAndPunctuation()
5555
{
5656
Assert.True(Pangram.IsPangram("\"Five quacking Zephyrs jolt my wax bed.\""));
5757
}
5858

5959
[Fact(Skip = "Remove this Skip property to run this test")]
60-
public void A_m_and_a_m_are_26_different_characters_but_not_a_pangram()
60+
public void AMAndAMAre26DifferentCharactersButNotAPangram()
6161
{
6262
Assert.False(Pangram.IsPangram("abcdefghijklm ABCDEFGHIJKLM"));
6363
}

generators/Exercises/Generators/Pangram.cs

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)