Skip to content

Commit 1b387f8

Browse files
Upgrade to NUnit 3
1 parent d7a20e1 commit 1b387f8

46 files changed

Lines changed: 456 additions & 456 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

accumulate/AccumulateTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ public void Empty_accumulation_produces_empty_accumulation()
1212
Assert.That(new int[0].Accumulate(x => x * x), Is.EqualTo(new int[0]));
1313
}
1414

15-
[Ignore]
15+
[Ignore("Remove to run test")]
1616
[Test]
1717
public void Accumulate_squares()
1818
{
1919
Assert.That(new[] { 1, 2, 3 }.Accumulate(x => x * x), Is.EqualTo(new[] { 1, 4, 9 }));
2020
}
2121

22-
[Ignore]
22+
[Ignore("Remove to run test")]
2323
[Test]
2424
public void Accumulate_upcases()
2525
{
2626
Assert.That(new List<string> { "hello", "world" }.Accumulate(x => x.ToUpper()),
2727
Is.EqualTo(new List<string> { "HELLO", "WORLD" }));
2828
}
2929

30-
[Ignore]
30+
[Ignore("Remove to run test")]
3131
[Test]
3232
public void Accumulate_reversed_strings()
3333
{
@@ -42,7 +42,7 @@ private static string Reverse(string value)
4242
return new string(array);
4343
}
4444

45-
[Ignore]
45+
[Ignore("Remove to run test")]
4646
[Test]
4747
public void Accumulate_within_accumulate()
4848
{
@@ -51,7 +51,7 @@ public void Accumulate_within_accumulate()
5151
Assert.That(actual, Is.EqualTo(new[] { "a1 a2 a3", "b1 b2 b3", "c1 c2 c3" }));
5252
}
5353

54-
[Ignore]
54+
[Ignore("Remove to run test")]
5555
[Test]
5656
public void Accumulate_is_lazy()
5757
{

acronym/AcronymTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ public void Empty_string_abbreviated_to_empty_string()
1111
Assert.That(Acronym.Abbreviate(string.Empty), Is.EqualTo(string.Empty));
1212
}
1313

14-
[TestCase("Portable Network Graphics", Result = "PNG", Ignore = true)]
15-
[TestCase("Ruby on Rails", Result = "ROR", Ignore = true)]
16-
[TestCase("HyperText Markup Language", Result = "HTML", Ignore = true)]
17-
[TestCase("First In, First Out", Result = "FIFO", Ignore = true)]
18-
[TestCase("PHP: Hypertext Preprocessor", Result = "PHP", Ignore = true)]
19-
[TestCase("Complementary metal-oxide semiconductor", Result = "CMOS", Ignore = true)]
14+
[TestCase("Portable Network Graphics", ExpectedResult = "PNG", Ignore = "Remove to run test case")]
15+
[TestCase("Ruby on Rails", ExpectedResult = "ROR", Ignore = "Remove to run test case")]
16+
[TestCase("HyperText Markup Language", ExpectedResult = "HTML", Ignore = "Remove to run test case")]
17+
[TestCase("First In, First Out", ExpectedResult = "FIFO", Ignore = "Remove to run test case")]
18+
[TestCase("PHP: Hypertext Preprocessor", ExpectedResult = "PHP", Ignore = "Remove to run test case")]
19+
[TestCase("Complementary metal-oxide semiconductor", ExpectedResult = "CMOS", Ignore = "Remove to run test case")]
2020
public string Phrase_abbreviated_to_acronym(string phrase)
2121
{
2222
return Acronym.Abbreviate(phrase);

allergies/AllergiesTest.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ public void No_allergies_means_not_allergic()
1313
Assert.That(allergies.AllergicTo("strawberries"), Is.False);
1414
}
1515

16-
[Ignore]
16+
[Ignore("Remove to run test")]
1717
[Test]
1818
public void Allergic_to_eggs()
1919
{
2020
var allergies = new Allergies(1);
2121
Assert.That(allergies.AllergicTo("eggs"), Is.True);
2222
}
2323

24-
[Ignore]
24+
[Ignore("Remove to run test")]
2525
[Test]
2626
public void Allergic_to_eggs_in_addition_to_other_stuff()
2727
{
@@ -31,39 +31,39 @@ public void Allergic_to_eggs_in_addition_to_other_stuff()
3131
Assert.That(allergies.AllergicTo("strawberries"), Is.False);
3232
}
3333

34-
[Ignore]
34+
[Ignore("Remove to run test")]
3535
[Test]
3636
public void No_allergies_at_all()
3737
{
3838
var allergies = new Allergies(0);
3939
Assert.That(allergies.List(), Is.Empty);
4040
}
4141

42-
[Ignore]
42+
[Ignore("Remove to run test")]
4343
[Test]
4444
public void Allergic_to_just_eggs()
4545
{
4646
var allergies = new Allergies(1);
4747
Assert.That(allergies.List(), Is.EqualTo(new List<string> { "eggs" }));
4848
}
4949

50-
[Ignore]
50+
[Ignore("Remove to run test")]
5151
[Test]
5252
public void Allergic_to_just_peanuts()
5353
{
5454
var allergies = new Allergies(2);
5555
Assert.That(allergies.List(), Is.EqualTo(new List<string> { "peanuts" }));
5656
}
5757

58-
[Ignore]
58+
[Ignore("Remove to run test")]
5959
[Test]
6060
public void Allergic_to_eggs_and_peanuts()
6161
{
6262
var allergies = new Allergies(3);
6363
Assert.That(allergies.List(), Is.EqualTo(new List<string> { "eggs", "peanuts" }));
6464
}
6565

66-
[Ignore]
66+
[Ignore("Remove to run test")]
6767
[Test]
6868
public void Allergic_to_lots_of_stuff()
6969
{
@@ -72,7 +72,7 @@ public void Allergic_to_lots_of_stuff()
7272
Is.EqualTo(new List<string> { "strawberries", "tomatoes", "chocolate", "pollen", "cats" }));
7373
}
7474

75-
[Ignore]
75+
[Ignore("Remove to run test")]
7676
[Test]
7777
public void Allergic_to_everything()
7878
{
@@ -91,7 +91,7 @@ public void Allergic_to_everything()
9191
}));
9292
}
9393

94-
[Ignore]
94+
[Ignore("Remove to run test")]
9595
[Test]
9696
public void Ignore_non_allergen_score_parts()
9797
{

anagram/AnagramTest.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public void No_matches()
1212
Assert.That(detector.Match(words), Is.EquivalentTo(results));
1313
}
1414

15-
[Ignore]
15+
[Ignore("Remove to run test")]
1616
[Test]
1717
public void Detect_simple_anagram()
1818
{
@@ -22,7 +22,7 @@ public void Detect_simple_anagram()
2222
Assert.That(detector.Match(words), Is.EquivalentTo(results));
2323
}
2424

25-
[Ignore]
25+
[Ignore("Remove to run test")]
2626
[Test]
2727
public void Detect_multiple_anagrams()
2828
{
@@ -32,7 +32,7 @@ public void Detect_multiple_anagrams()
3232
Assert.That(detector.Match(words), Is.EquivalentTo(results));
3333
}
3434

35-
[Ignore]
35+
[Ignore("Remove to run test")]
3636
[Test]
3737
public void Does_not_confuse_different_duplicates()
3838
{
@@ -42,7 +42,7 @@ public void Does_not_confuse_different_duplicates()
4242
Assert.That(detector.Match(words), Is.EquivalentTo(results));
4343
}
4444

45-
[Ignore]
45+
[Ignore("Remove to run test")]
4646
[Test]
4747
public void Identical_word_is_not_anagram()
4848
{
@@ -52,7 +52,7 @@ public void Identical_word_is_not_anagram()
5252
Assert.That(detector.Match(words), Is.EquivalentTo(results));
5353
}
5454

55-
[Ignore]
55+
[Ignore("Remove to run test")]
5656
[Test]
5757
public void Eliminate_anagrams_with_same_checksum()
5858
{
@@ -62,7 +62,7 @@ public void Eliminate_anagrams_with_same_checksum()
6262
Assert.That(detector.Match(words), Is.EquivalentTo(results));
6363
}
6464

65-
[Ignore]
65+
[Ignore("Remove to run test")]
6666
[Test]
6767
public void Eliminate_anagram_subsets()
6868
{
@@ -72,7 +72,7 @@ public void Eliminate_anagram_subsets()
7272
Assert.That(detector.Match(words), Is.EquivalentTo(results));
7373
}
7474

75-
[Ignore]
75+
[Ignore("Remove to run test")]
7676
[Test]
7777
public void Detect_anagrams()
7878
{
@@ -82,7 +82,7 @@ public void Detect_anagrams()
8282
Assert.That(detector.Match(words), Is.EquivalentTo(results));
8383
}
8484

85-
[Ignore]
85+
[Ignore("Remove to run test")]
8686
[Test]
8787
public void Anagrams_are_case_insensitive()
8888
{

atbash-cipher/AtbashTest.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
public class AtbashTest
55
{
66
// change Ignore to false to run test case or just remove 'Ignore = true'
7-
[TestCase("no", Result = "ml")]
8-
[TestCase("yes", Result = "bvh", Ignore = true)]
9-
[TestCase("OMG", Result = "lnt", Ignore = true)]
10-
[TestCase("mindblowingly", Result = "nrmwy oldrm tob", Ignore = true)]
11-
[TestCase("Testing, 1 2 3, testing.", Result = "gvhgr mt123 gvhgr mt", Ignore = true)]
12-
[TestCase("Truth is fiction.", Result = "gifgs rhurx grlm", Ignore = true)]
13-
[TestCase("The quick brown fox jumps over the lazy dog.", Result = "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt", Ignore = true)]
7+
[TestCase("no", ExpectedResult = "ml")]
8+
[TestCase("yes", ExpectedResult = "bvh", Ignore = "Remove to run test case")]
9+
[TestCase("OMG", ExpectedResult = "lnt", Ignore = "Remove to run test case")]
10+
[TestCase("mindblowingly", ExpectedResult = "nrmwy oldrm tob", Ignore = "Remove to run test case")]
11+
[TestCase("Testing, 1 2 3, testing.", ExpectedResult = "gvhgr mt123 gvhgr mt", Ignore = "Remove to run test case")]
12+
[TestCase("Truth is fiction.", ExpectedResult = "gifgs rhurx grlm", Ignore = "Remove to run test case")]
13+
[TestCase("The quick brown fox jumps over the lazy dog.", ExpectedResult = "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt", Ignore = "Remove to run test case")]
1414
public string Encodes_words_using_atbash_cipher(string words)
1515
{
1616
return Atbash.Encode(words);

binary/BinaryTest.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,30 @@
44
public class BinaryTest
55
{
66
// change Ignore to false to run test case or just remove 'Ignore = true'
7-
[TestCase("1", Result = 1)]
8-
[TestCase("10", Result = 2, Ignore = true)]
9-
[TestCase("11", Result = 3, Ignore = true)]
10-
[TestCase("100", Result = 4, Ignore = true)]
11-
[TestCase("1001", Result = 9, Ignore = true)]
12-
[TestCase("11010", Result = 26, Ignore = true)]
13-
[TestCase("10001101000", Result = 1128, Ignore = true)]
7+
[TestCase("1", ExpectedResult = 1)]
8+
[TestCase("10", ExpectedResult = 2, Ignore = "Remove to run test case")]
9+
[TestCase("11", ExpectedResult = 3, Ignore = "Remove to run test case")]
10+
[TestCase("100", ExpectedResult = 4, Ignore = "Remove to run test case")]
11+
[TestCase("1001", ExpectedResult = 9, Ignore = "Remove to run test case")]
12+
[TestCase("11010", ExpectedResult = 26, Ignore = "Remove to run test case")]
13+
[TestCase("10001101000", ExpectedResult = 1128, Ignore = "Remove to run test case")]
1414
public int Binary_converts_to_decimal(string binary)
1515
{
1616
return Binary.ToDecimal(binary);
1717
}
1818

19-
[TestCase("carrot", Ignore = true)]
20-
[TestCase("2", Ignore = true)]
21-
[TestCase("5", Ignore = true)]
22-
[TestCase("9", Ignore = true)]
23-
[TestCase("134678", Ignore = true)]
24-
[TestCase("abc10z", Ignore = true)]
19+
[TestCase("carrot", Ignore = "Remove to run test case")]
20+
[TestCase("2", Ignore = "Remove to run test case")]
21+
[TestCase("5", Ignore = "Remove to run test case")]
22+
[TestCase("9", Ignore = "Remove to run test case")]
23+
[TestCase("134678", Ignore = "Remove to run test case")]
24+
[TestCase("abc10z", Ignore = "Remove to run test case")]
2525
public void Invalid_binary_is_decimal_0(string invalidValue)
2626
{
2727
Assert.That(Binary.ToDecimal(invalidValue), Is.EqualTo(0));
2828
}
2929

30-
[Ignore]
30+
[Ignore("Remove to run test")]
3131
[Test]
3232
public void Binary_can_convert_formatted_strings()
3333
{

0 commit comments

Comments
 (0)