diff --git a/README.md b/README.md index 5769ed691109632afc07e6ab097c285165e88c6d..12d67361c99e8c946f764ed05397953a52c8375b 100644 --- a/README.md +++ b/README.md @@ -236,7 +236,7 @@ This assignment is worth **16 points**: test cases provided, and * **1.0 point** if your solution to Part II uses a single conditional. -The assignment is due Monday, September 28 at 9:00 a.m. +The assignment is due Wednesday, September 30 at 9:00 a.m. **NOTE: You will lose 2 points if you do not follow the file-naming conventions listed in the instructions.** diff --git a/src/test/java/edu/unl/cse/soft160/conditionals/CaucusTest.java b/src/test/java/edu/unl/cse/soft160/conditionals/CaucusTest.java index d521531f1d20c8cca369893af90b8e0010d14e5d..a3ddf96a470a8206b08f681689c80052d729fd1a 100644 --- a/src/test/java/edu/unl/cse/soft160/conditionals/CaucusTest.java +++ b/src/test/java/edu/unl/cse/soft160/conditionals/CaucusTest.java @@ -27,58 +27,74 @@ public class CaucusTest { } @Test - public void testAcquireWithNoRotation() { + public void testInvalidReportNotOnCaucusDay() { assertEquals(assemble("Is today a caucus day (yes/no)? " - + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + "Is the precinct report a telephoned report (yes/no)? " - + "Precinct report rejected"), runMain("no", "no", "no")); + + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + + "Is the precinct report a telephoned report (yes/no)? " + + "Precinct report rejected"), + runMain("no", "no", "no")); } @Test - public void testAcquireWithSTTRotation() { + public void testTelephoneReportNotOnCaucusDay() { assertEquals(assemble("Is today a caucus day (yes/no)? " - + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + "Is the precinct report a telephoned report (yes/no)? " - + "Precinct report rejected"), runMain("no", "no", "yes")); + + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + + "Is the precinct report a telephoned report (yes/no)? " + + "Precinct report rejected"), + runMain("no", "no", "yes")); } @Test - public void testAcquireWithIRURotation() { + public void testWellFormattedElectronicReportNotOnCaucusDay() { assertEquals(assemble("Is today a caucus day (yes/no)? " - + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + "Is the precinct report a telephoned report (yes/no)? " - + "Precinct report rejected"), runMain("no", "yes", "no")); + + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + + "Is the precinct report a telephoned report (yes/no)? " + + "Precinct report rejected"), + runMain("no", "yes", "no")); } @Test - public void testAcquireWithRotation() { + public void testDuplicatedReportNotOnCaucusDay() { assertEquals(assemble("Is today a caucus day (yes/no)? " - + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + "Is the precinct report a telephoned report (yes/no)? " - + "Precinct report rejected"), runMain("no", "yes", "yes")); + + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + + "Is the precinct report a telephoned report (yes/no)? " + + "Precinct report rejected"), + runMain("no", "yes", "yes")); } @Test - public void testTrackWithNoRotation() { + public void testInvalidReportOnCaucusDay() { assertEquals(assemble("Is today a caucus day (yes/no)? " - + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + "Is the precinct report a telephoned report (yes/no)? " - + "Precinct report rejected"), runMain("yes", "no", "no")); + + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + + "Is the precinct report a telephoned report (yes/no)? " + + "Precinct report rejected"), + runMain("yes", "no", "no")); } @Test - public void testTrackWithSTTRotation() { + public void testTelephoneReportOnCaucusDay() { assertEquals(assemble("Is today a caucus day (yes/no)? " - + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + "Is the precinct report a telephoned report (yes/no)? " - + "Precinct report accepted"), runMain("yes", "no", "yes")); + + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + + "Is the precinct report a telephoned report (yes/no)? " + + "Precinct report accepted"), + runMain("yes", "no", "yes")); } @Test - public void testTrackWithIRURotation() { + public void testWellFormattedElectronicReportOnCaucusDay() { assertEquals(assemble("Is today a caucus day (yes/no)? " - + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + "Is the precinct report a telephoned report (yes/no)? " - + "Precinct report accepted"), runMain("yes", "yes", "no")); + + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + + "Is the precinct report a telephoned report (yes/no)? " + + "Precinct report accepted"), + runMain("yes", "yes", "no")); } @Test - public void testTrackWithRotation() { + public void testDuplicatedReportOnCaucusDay() { assertEquals(assemble("Is today a caucus day (yes/no)? " - + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + "Is the precinct report a telephoned report (yes/no)? " - + "Precinct report accepted"), runMain("yes", "yes", "yes")); + + "Is the precinct report a correctly-formatted electronic report (yes/no)? " + + "Is the precinct report a telephoned report (yes/no)? " + + "Precinct report accepted"), + runMain("yes", "yes", "yes")); } }