瀏覽代碼

twelve-days: update starter implementation to match POLICIES.md

Logan Stucki 9 年之前
父節點
當前提交
e598bc3afc
沒有帳戶連結到提交者的電子郵件

+ 8
- 4
exercises/twelve-days/src/main/java/TwelveDays.java 查看文件

1
 public class TwelveDays {
1
 public class TwelveDays {
2
-	public String verse(int verseNumber) {
3
-		throw new UnsupportedOperationException("Delete this statement and provide your own implementation.");
4
-	}
5
-}
2
+    public String verse(int verseNumber) {
3
+        throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
4
+    }
5
+
6
+    public String verses(int startVerse, int endVerse) {
7
+        throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
8
+    }
9
+}

+ 0
- 4
exercises/twelve-days/src/test/java/TwelveDaysTest.java 查看文件

120
     @Ignore("Remove to run test")
120
     @Ignore("Remove to run test")
121
     @Test
121
     @Test
122
     public void testMultipleVerses() {
122
     public void testMultipleVerses() {
123
-/*
124
         String expectedVerseOneToThree = "On the first day of Christmas my true love gave to me, " +
123
         String expectedVerseOneToThree = "On the first day of Christmas my true love gave to me, " +
125
                 "a Partridge in a Pear Tree.\n\n" +
124
                 "a Partridge in a Pear Tree.\n\n" +
126
                 "On the second day of Christmas my true love gave to me, two Turtle Doves, " +
125
                 "On the second day of Christmas my true love gave to me, two Turtle Doves, " +
128
                 "On the third day of Christmas my true love gave to me, three French Hens, two Turtle Doves, " +
127
                 "On the third day of Christmas my true love gave to me, three French Hens, two Turtle Doves, " +
129
                 "and a Partridge in a Pear Tree.\n";
128
                 "and a Partridge in a Pear Tree.\n";
130
         assertEquals(expectedVerseOneToThree, twelveDays.verses(1, 3));
129
         assertEquals(expectedVerseOneToThree, twelveDays.verses(1, 3));
131
-*/
132
     }
130
     }
133
 
131
 
134
     @Ignore("Remove to run test")
132
     @Ignore("Remove to run test")
135
     @Test
133
     @Test
136
     public void testSingWholeSong() {
134
     public void testSingWholeSong() {
137
-/*
138
         String expectedSong = "On the first day of Christmas my true love gave to me, a Partridge in a Pear Tree.\n" +
135
         String expectedSong = "On the first day of Christmas my true love gave to me, a Partridge in a Pear Tree.\n" +
139
                 "\n" +
136
                 "\n" +
140
                 "On the second day of Christmas my true love gave to me, two Turtle Doves, " +
137
                 "On the second day of Christmas my true love gave to me, two Turtle Doves, " +
178
                 "seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, " +
175
                 "seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, " +
179
                 "three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.\n";
176
                 "three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.\n";
180
         assertEquals(expectedSong, twelveDays.sing());
177
         assertEquals(expectedSong, twelveDays.sing());
181
-*/
182
     }
178
     }
183
 }
179
 }