|
|
@@ -17,53 +17,61 @@ public class BeerSongTest {
|
|
17
|
17
|
public void singFirstVerse() {
|
|
18
|
18
|
assertEquals("99 bottles of beer on the wall, 99 bottles of beer.\n" +
|
|
19
|
19
|
"Take one down and pass it around, 98 bottles of beer on the wall.\n\n",
|
|
20
|
|
- beerSong.verse(99));
|
|
|
20
|
+ beerSong.sing(99, 1));
|
|
21
|
21
|
}
|
|
22
|
22
|
|
|
23
|
23
|
@Ignore("Remove to run test")
|
|
24
|
24
|
@Test
|
|
25
|
|
- public void singMiddleVerse() {
|
|
26
|
|
- assertEquals("44 bottles of beer on the wall, 44 bottles of beer.\n" +
|
|
27
|
|
- "Take one down and pass it around, 43 bottles of beer on the wall.\n\n",
|
|
28
|
|
- beerSong.verse(44));
|
|
|
25
|
+ public void singLastGenericVerse() {
|
|
|
26
|
+ assertEquals("3 bottles of beer on the wall, 3 bottles of beer.\n" +
|
|
|
27
|
+ "Take one down and pass it around, 2 bottles of beer on the wall.\n\n",
|
|
|
28
|
+ beerSong.sing(3, 1));
|
|
29
|
29
|
}
|
|
30
|
30
|
|
|
31
|
31
|
@Ignore("Remove to run test")
|
|
32
|
32
|
@Test
|
|
33
|
|
- public void singThirdToLastVerse() {
|
|
|
33
|
+ public void verseWithTwoBottles() {
|
|
34
|
34
|
assertEquals("2 bottles of beer on the wall, 2 bottles of beer.\n" +
|
|
35
|
35
|
"Take one down and pass it around, 1 bottle of beer on the wall.\n\n",
|
|
36
|
|
- beerSong.verse(2));
|
|
|
36
|
+ beerSong.sing(2, 1));
|
|
37
|
37
|
}
|
|
38
|
38
|
|
|
39
|
39
|
@Ignore("Remove to run test")
|
|
40
|
40
|
@Test
|
|
41
|
|
- public void singPenultimateVerse() {
|
|
|
41
|
+ public void verseWithOneBottle() {
|
|
42
|
42
|
assertEquals("1 bottle of beer on the wall, 1 bottle of beer.\n" +
|
|
43
|
43
|
"Take it down and pass it around, no more bottles of beer on the wall.\n\n",
|
|
44
|
|
- beerSong.verse(1));
|
|
|
44
|
+ beerSong.sing(1, 1));
|
|
45
|
45
|
}
|
|
46
|
46
|
|
|
47
|
47
|
@Ignore("Remove to run test")
|
|
48
|
48
|
@Test
|
|
49
|
|
- public void singLastVerse() {
|
|
|
49
|
+ public void verseWithZeroBottles() {
|
|
50
|
50
|
assertEquals("No more bottles of beer on the wall, no more bottles of beer.\n" +
|
|
51
|
51
|
"Go to the store and buy some more, 99 bottles of beer on the wall.\n\n",
|
|
52
|
|
- beerSong.verse(0));
|
|
|
52
|
+ beerSong.sing(0, 1));
|
|
53
|
53
|
}
|
|
54
|
54
|
|
|
55
|
55
|
@Ignore("Remove to run test")
|
|
56
|
56
|
@Test
|
|
57
|
|
- public void singLastFourVerses() {
|
|
58
|
|
- assertEquals("3 bottles of beer on the wall, 3 bottles of beer.\n" +
|
|
59
|
|
- "Take one down and pass it around, 2 bottles of beer on the wall.\n\n" +
|
|
60
|
|
- "2 bottles of beer on the wall, 2 bottles of beer.\n" +
|
|
|
57
|
+ public void singFirstTwoVerses() {
|
|
|
58
|
+ assertEquals("99 bottles of beer on the wall, 99 bottles of beer.\n" +
|
|
|
59
|
+ "Take one down and pass it around, 98 bottles of beer on the wall.\n\n" +
|
|
|
60
|
+ "98 bottles of beer on the wall, 98 bottles of beer.\n" +
|
|
|
61
|
+ "Take one down and pass it around, 97 bottles of beer on the wall.\n\n",
|
|
|
62
|
+ beerSong.sing(99, 2));
|
|
|
63
|
+ }
|
|
|
64
|
+
|
|
|
65
|
+ @Ignore("Remove to run test")
|
|
|
66
|
+ @Test
|
|
|
67
|
+ public void singLastThreeVerses() {
|
|
|
68
|
+ assertEquals("2 bottles of beer on the wall, 2 bottles of beer.\n" +
|
|
61
|
69
|
"Take one down and pass it around, 1 bottle of beer on the wall.\n\n" +
|
|
62
|
70
|
"1 bottle of beer on the wall, 1 bottle of beer.\n" +
|
|
63
|
71
|
"Take it down and pass it around, no more bottles of beer on the wall.\n\n" +
|
|
64
|
72
|
"No more bottles of beer on the wall, no more bottles of beer.\n" +
|
|
65
|
73
|
"Go to the store and buy some more, 99 bottles of beer on the wall.\n\n",
|
|
66
|
|
- beerSong.sing(3,0));
|
|
|
74
|
+ beerSong.sing(2, 3));
|
|
67
|
75
|
}
|
|
68
|
76
|
|
|
69
|
77
|
@Ignore("Remove to run test")
|