From 6e735c4776f43bef5c38750694df625da2664f6a Mon Sep 17 00:00:00 2001 From: Smarticles101 Date: Tue, 4 Jul 2017 11:03:27 -0500 Subject: [PATCH 1/3] twelve-days: create and validate starter implementations according to POLICIES.md --- exercises/twelve-days/src/main/java/.keep | 0 exercises/twelve-days/src/main/java/TwelveDays.java | 5 +++++ exercises/twelve-days/src/test/java/TwelveDaysTest.java | 4 ++++ 3 files changed, 9 insertions(+) delete mode 100644 exercises/twelve-days/src/main/java/.keep create mode 100644 exercises/twelve-days/src/main/java/TwelveDays.java diff --git a/exercises/twelve-days/src/main/java/.keep b/exercises/twelve-days/src/main/java/.keep deleted file mode 100644 index e69de29bb..000000000 diff --git a/exercises/twelve-days/src/main/java/TwelveDays.java b/exercises/twelve-days/src/main/java/TwelveDays.java new file mode 100644 index 000000000..061550d94 --- /dev/null +++ b/exercises/twelve-days/src/main/java/TwelveDays.java @@ -0,0 +1,5 @@ +public class TwelveDays { + public String verse(int verseNumber) { + throw new UnsupportedOperationException("Delete this statement and provide your own implementation."); + } +} \ No newline at end of file diff --git a/exercises/twelve-days/src/test/java/TwelveDaysTest.java b/exercises/twelve-days/src/test/java/TwelveDaysTest.java index ced94597f..cc3f72567 100644 --- a/exercises/twelve-days/src/test/java/TwelveDaysTest.java +++ b/exercises/twelve-days/src/test/java/TwelveDaysTest.java @@ -120,6 +120,7 @@ public void testVerseTwelve() { @Ignore("Remove to run test") @Test public void testMultipleVerses() { +/* 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, " + @@ -127,11 +128,13 @@ public void testMultipleVerses() { "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()); +*/ } } From e598bc3afcc25ac62c132ba9809514146e8a04b4 Mon Sep 17 00:00:00 2001 From: Logan Stucki Date: Tue, 4 Jul 2017 12:31:50 -0500 Subject: [PATCH 2/3] twelve-days: update starter implementation to match POLICIES.md --- exercises/twelve-days/src/main/java/TwelveDays.java | 12 ++++++++---- .../twelve-days/src/test/java/TwelveDaysTest.java | 4 ---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/exercises/twelve-days/src/main/java/TwelveDays.java b/exercises/twelve-days/src/main/java/TwelveDays.java index 061550d94..d1aa6f550 100644 --- a/exercises/twelve-days/src/main/java/TwelveDays.java +++ b/exercises/twelve-days/src/main/java/TwelveDays.java @@ -1,5 +1,9 @@ public class TwelveDays { - public String verse(int verseNumber) { - throw new UnsupportedOperationException("Delete this statement and provide your own implementation."); - } -} \ No newline at end of file + public String verse(int verseNumber) { + throw new UnsupportedOperationException("Delete this statement and write your own implementation."); + } + + public String verses(int startVerse, int endVerse) { + throw new UnsupportedOperationException("Delete this statement and write your own implementation."); + } +} diff --git a/exercises/twelve-days/src/test/java/TwelveDaysTest.java b/exercises/twelve-days/src/test/java/TwelveDaysTest.java index cc3f72567..ced94597f 100644 --- a/exercises/twelve-days/src/test/java/TwelveDaysTest.java +++ b/exercises/twelve-days/src/test/java/TwelveDaysTest.java @@ -120,7 +120,6 @@ public void testVerseTwelve() { @Ignore("Remove to run test") @Test public void testMultipleVerses() { -/* 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, " + @@ -128,13 +127,11 @@ public void testMultipleVerses() { "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, " + @@ -178,6 +175,5 @@ 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()); -*/ } } From 5c29756841293bc41de6a0295349707dcabf687e Mon Sep 17 00:00:00 2001 From: Logan Stucki Date: Tue, 4 Jul 2017 12:37:23 -0500 Subject: [PATCH 3/3] twelve-days: remove public's from starter implementation --- exercises/twelve-days/src/main/java/TwelveDays.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/twelve-days/src/main/java/TwelveDays.java b/exercises/twelve-days/src/main/java/TwelveDays.java index d1aa6f550..98e3f147c 100644 --- a/exercises/twelve-days/src/main/java/TwelveDays.java +++ b/exercises/twelve-days/src/main/java/TwelveDays.java @@ -1,9 +1,9 @@ -public class TwelveDays { - public String verse(int verseNumber) { +class TwelveDays { + String verse(int verseNumber) { throw new UnsupportedOperationException("Delete this statement and write your own implementation."); } - public String verses(int startVerse, int endVerse) { + String verses(int startVerse, int endVerse) { throw new UnsupportedOperationException("Delete this statement and write your own implementation."); } }