-
-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
twelve-days: create and validate starter implementation #683
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
public class TwelveDays { | ||
public String verse(int verseNumber) { | ||
throw new UnsupportedOperationException("Delete this statement and provide your own implementation."); | ||
} | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,18 +120,21 @@ public void testVerseTwelve() { | |
@Ignore("Remove to run test") | ||
@Test | ||
public void testMultipleVerses() { | ||
/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The more I think about this strategy, the more convinced I am that the net effect is more confusing than useful. I think that's because:
IMO it would be simpler to say: full API stubs for exercises 1-20: no stubs or class only stubs for exercises 21+ (with exceptions for really tricky signatures as in list-ops). Thoughts, @FridaTveit @Smarticles101? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was thinking the same thing when reading the policies doc. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Awesome; in light of that consensus, please update this PR to include stubs of both methods and no commented-out tests; I'll update the policies doc right now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Doc updated.) |
||
String expectedVerseOneToThree = "On the first day of Christmas my true love gave to me, " + | ||
"a Partridge in a Pear Tree.\n\n" + | ||
"On the second day of Christmas my true love gave to me, two Turtle Doves, " + | ||
"and a Partridge in a Pear Tree.\n\n" + | ||
"On the third day of Christmas my true love gave to me, three French Hens, two Turtle Doves, " + | ||
"and a Partridge in a Pear Tree.\n"; | ||
assertEquals(expectedVerseOneToThree, twelveDays.verses(1, 3)); | ||
*/ | ||
} | ||
|
||
@Ignore("Remove to run test") | ||
@Test | ||
public void testSingWholeSong() { | ||
/* | ||
String expectedSong = "On the first day of Christmas my true love gave to me, a Partridge in a Pear Tree.\n" + | ||
"\n" + | ||
"On the second day of Christmas my true love gave to me, two Turtle Doves, " + | ||
|
@@ -175,5 +178,6 @@ public void testSingWholeSong() { | |
"seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, " + | ||
"three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.\n"; | ||
assertEquals(expectedSong, twelveDays.sing()); | ||
*/ | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please indent with 4 spaces for consistency.