|
1 | | -using Xunit; |
2 | | - |
3 | 1 | public class BottleSongTests |
4 | 2 | { |
5 | 3 | [Fact] |
6 | 4 | public void Verse_single_verse_first_generic_verse() |
7 | 5 | { |
8 | | - Assert.Equal(["Ten green bottles hanging on the wall,", "Ten green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be nine green bottles hanging on the wall."], BottleSong.Recite(10, 1)); |
| 6 | + string[] expected = [ |
| 7 | + "Ten green bottles hanging on the wall,", |
| 8 | + "Ten green bottles hanging on the wall,", |
| 9 | + "And if one green bottle should accidentally fall,", |
| 10 | + "There'll be nine green bottles hanging on the wall." |
| 11 | + ]; |
| 12 | + Assert.Equal(expected, BottleSong.Recite(10, 1)); |
9 | 13 | } |
10 | 14 |
|
11 | | - [Fact] |
| 15 | + [Fact(Skip = "Remove this Skip property to run this test")] |
12 | 16 | public void Verse_single_verse_last_generic_verse() |
13 | 17 | { |
14 | | - Assert.Equal(["Three green bottles hanging on the wall,", "Three green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be two green bottles hanging on the wall."], BottleSong.Recite(3, 1)); |
| 18 | + string[] expected = [ |
| 19 | + "Three green bottles hanging on the wall,", |
| 20 | + "Three green bottles hanging on the wall,", |
| 21 | + "And if one green bottle should accidentally fall,", |
| 22 | + "There'll be two green bottles hanging on the wall." |
| 23 | + ]; |
| 24 | + Assert.Equal(expected, BottleSong.Recite(3, 1)); |
15 | 25 | } |
16 | 26 |
|
17 | | - [Fact] |
| 27 | + [Fact(Skip = "Remove this Skip property to run this test")] |
18 | 28 | public void Verse_single_verse_verse_with_2_bottles() |
19 | 29 | { |
20 | | - Assert.Equal(["Two green bottles hanging on the wall,", "Two green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be one green bottle hanging on the wall."], BottleSong.Recite(2, 1)); |
| 30 | + string[] expected = [ |
| 31 | + "Two green bottles hanging on the wall,", |
| 32 | + "Two green bottles hanging on the wall,", |
| 33 | + "And if one green bottle should accidentally fall,", |
| 34 | + "There'll be one green bottle hanging on the wall." |
| 35 | + ]; |
| 36 | + Assert.Equal(expected, BottleSong.Recite(2, 1)); |
21 | 37 | } |
22 | 38 |
|
23 | | - [Fact] |
| 39 | + [Fact(Skip = "Remove this Skip property to run this test")] |
24 | 40 | public void Verse_single_verse_verse_with_1_bottle() |
25 | 41 | { |
26 | | - Assert.Equal(["One green bottle hanging on the wall,", "One green bottle hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be no green bottles hanging on the wall."], BottleSong.Recite(1, 1)); |
| 42 | + string[] expected = [ |
| 43 | + "One green bottle hanging on the wall,", |
| 44 | + "One green bottle hanging on the wall,", |
| 45 | + "And if one green bottle should accidentally fall,", |
| 46 | + "There'll be no green bottles hanging on the wall." |
| 47 | + ]; |
| 48 | + Assert.Equal(expected, BottleSong.Recite(1, 1)); |
27 | 49 | } |
28 | 50 |
|
29 | | - [Fact] |
| 51 | + [Fact(Skip = "Remove this Skip property to run this test")] |
30 | 52 | public void Lyrics_multiple_verses_first_two_verses() |
31 | 53 | { |
32 | | - Assert.Equal(["Ten green bottles hanging on the wall,", "Ten green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be nine green bottles hanging on the wall.", "", "Nine green bottles hanging on the wall,", "Nine green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be eight green bottles hanging on the wall."], BottleSong.Recite(10, 2)); |
| 54 | + string[] expected = [ |
| 55 | + "Ten green bottles hanging on the wall,", |
| 56 | + "Ten green bottles hanging on the wall,", |
| 57 | + "And if one green bottle should accidentally fall,", |
| 58 | + "There'll be nine green bottles hanging on the wall.", |
| 59 | + "", |
| 60 | + "Nine green bottles hanging on the wall,", |
| 61 | + "Nine green bottles hanging on the wall,", |
| 62 | + "And if one green bottle should accidentally fall,", |
| 63 | + "There'll be eight green bottles hanging on the wall." |
| 64 | + ]; |
| 65 | + Assert.Equal(expected, BottleSong.Recite(10, 2)); |
33 | 66 | } |
34 | 67 |
|
35 | | - [Fact] |
| 68 | + [Fact(Skip = "Remove this Skip property to run this test")] |
36 | 69 | public void Lyrics_multiple_verses_last_three_verses() |
37 | 70 | { |
38 | | - Assert.Equal(["Three green bottles hanging on the wall,", "Three green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be two green bottles hanging on the wall.", "", "Two green bottles hanging on the wall,", "Two green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be one green bottle hanging on the wall.", "", "One green bottle hanging on the wall,", "One green bottle hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be no green bottles hanging on the wall."], BottleSong.Recite(3, 3)); |
| 71 | + string[] expected = [ |
| 72 | + "Three green bottles hanging on the wall,", |
| 73 | + "Three green bottles hanging on the wall,", |
| 74 | + "And if one green bottle should accidentally fall,", |
| 75 | + "There'll be two green bottles hanging on the wall.", |
| 76 | + "", |
| 77 | + "Two green bottles hanging on the wall,", |
| 78 | + "Two green bottles hanging on the wall,", |
| 79 | + "And if one green bottle should accidentally fall,", |
| 80 | + "There'll be one green bottle hanging on the wall.", |
| 81 | + "", |
| 82 | + "One green bottle hanging on the wall,", |
| 83 | + "One green bottle hanging on the wall,", |
| 84 | + "And if one green bottle should accidentally fall,", |
| 85 | + "There'll be no green bottles hanging on the wall." |
| 86 | + ]; |
| 87 | + Assert.Equal(expected, BottleSong.Recite(3, 3)); |
39 | 88 | } |
40 | 89 |
|
41 | | - [Fact] |
| 90 | + [Fact(Skip = "Remove this Skip property to run this test")] |
42 | 91 | public void Lyrics_multiple_verses_all_verses() |
43 | 92 | { |
44 | | - Assert.Equal(["Ten green bottles hanging on the wall,", "Ten green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be nine green bottles hanging on the wall.", "", "Nine green bottles hanging on the wall,", "Nine green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be eight green bottles hanging on the wall.", "", "Eight green bottles hanging on the wall,", "Eight green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be seven green bottles hanging on the wall.", "", "Seven green bottles hanging on the wall,", "Seven green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be six green bottles hanging on the wall.", "", "Six green bottles hanging on the wall,", "Six green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be five green bottles hanging on the wall.", "", "Five green bottles hanging on the wall,", "Five green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be four green bottles hanging on the wall.", "", "Four green bottles hanging on the wall,", "Four green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be three green bottles hanging on the wall.", "", "Three green bottles hanging on the wall,", "Three green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be two green bottles hanging on the wall.", "", "Two green bottles hanging on the wall,", "Two green bottles hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be one green bottle hanging on the wall.", "", "One green bottle hanging on the wall,", "One green bottle hanging on the wall,", "And if one green bottle should accidentally fall,", "There'll be no green bottles hanging on the wall."], BottleSong.Recite(10, 10)); |
| 93 | + string[] expected = [ |
| 94 | + "Ten green bottles hanging on the wall,", |
| 95 | + "Ten green bottles hanging on the wall,", |
| 96 | + "And if one green bottle should accidentally fall,", |
| 97 | + "There'll be nine green bottles hanging on the wall.", |
| 98 | + "", |
| 99 | + "Nine green bottles hanging on the wall,", |
| 100 | + "Nine green bottles hanging on the wall,", |
| 101 | + "And if one green bottle should accidentally fall,", |
| 102 | + "There'll be eight green bottles hanging on the wall.", |
| 103 | + "", |
| 104 | + "Eight green bottles hanging on the wall,", |
| 105 | + "Eight green bottles hanging on the wall,", |
| 106 | + "And if one green bottle should accidentally fall,", |
| 107 | + "There'll be seven green bottles hanging on the wall.", |
| 108 | + "", |
| 109 | + "Seven green bottles hanging on the wall,", |
| 110 | + "Seven green bottles hanging on the wall,", |
| 111 | + "And if one green bottle should accidentally fall,", |
| 112 | + "There'll be six green bottles hanging on the wall.", |
| 113 | + "", |
| 114 | + "Six green bottles hanging on the wall,", |
| 115 | + "Six green bottles hanging on the wall,", |
| 116 | + "And if one green bottle should accidentally fall,", |
| 117 | + "There'll be five green bottles hanging on the wall.", |
| 118 | + "", |
| 119 | + "Five green bottles hanging on the wall,", |
| 120 | + "Five green bottles hanging on the wall,", |
| 121 | + "And if one green bottle should accidentally fall,", |
| 122 | + "There'll be four green bottles hanging on the wall.", |
| 123 | + "", |
| 124 | + "Four green bottles hanging on the wall,", |
| 125 | + "Four green bottles hanging on the wall,", |
| 126 | + "And if one green bottle should accidentally fall,", |
| 127 | + "There'll be three green bottles hanging on the wall.", |
| 128 | + "", |
| 129 | + "Three green bottles hanging on the wall,", |
| 130 | + "Three green bottles hanging on the wall,", |
| 131 | + "And if one green bottle should accidentally fall,", |
| 132 | + "There'll be two green bottles hanging on the wall.", |
| 133 | + "", |
| 134 | + "Two green bottles hanging on the wall,", |
| 135 | + "Two green bottles hanging on the wall,", |
| 136 | + "And if one green bottle should accidentally fall,", |
| 137 | + "There'll be one green bottle hanging on the wall.", |
| 138 | + "", |
| 139 | + "One green bottle hanging on the wall,", |
| 140 | + "One green bottle hanging on the wall,", |
| 141 | + "And if one green bottle should accidentally fall,", |
| 142 | + "There'll be no green bottles hanging on the wall." |
| 143 | + ]; |
| 144 | + Assert.Equal(expected, BottleSong.Recite(10, 10)); |
45 | 145 | } |
46 | 146 | } |
0 commit comments