Skip to content
Snippets Groups Projects
Commit a891119b authored by Christopher Bohn's avatar Christopher Bohn :thinking:
Browse files

Corrected test names in CaucusTest, updated due date

parent 3efdf940
No related branches found
No related tags found
No related merge requests found
...@@ -236,7 +236,7 @@ This assignment is worth **16 points**: ...@@ -236,7 +236,7 @@ This assignment is worth **16 points**:
test cases provided, and test cases provided, and
* **1.0 point** if your solution to Part II uses a single conditional. * **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 **NOTE: You will lose 2 points if you do not follow the file-naming conventions
listed in the instructions.** listed in the instructions.**
...@@ -27,58 +27,74 @@ public class CaucusTest { ...@@ -27,58 +27,74 @@ public class CaucusTest {
} }
@Test @Test
public void testAcquireWithNoRotation() { public void testInvalidReportNotOnCaucusDay() {
assertEquals(assemble("Is today a caucus day (yes/no)? " 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)? " + "Is the precinct report a correctly-formatted electronic report (yes/no)? "
+ "Precinct report rejected"), runMain("no", "no", "no")); + "Is the precinct report a telephoned report (yes/no)? "
+ "Precinct report rejected"),
runMain("no", "no", "no"));
} }
@Test @Test
public void testAcquireWithSTTRotation() { public void testTelephoneReportNotOnCaucusDay() {
assertEquals(assemble("Is today a caucus day (yes/no)? " 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)? " + "Is the precinct report a correctly-formatted electronic report (yes/no)? "
+ "Precinct report rejected"), runMain("no", "no", "yes")); + "Is the precinct report a telephoned report (yes/no)? "
+ "Precinct report rejected"),
runMain("no", "no", "yes"));
} }
@Test @Test
public void testAcquireWithIRURotation() { public void testWellFormattedElectronicReportNotOnCaucusDay() {
assertEquals(assemble("Is today a caucus day (yes/no)? " 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)? " + "Is the precinct report a correctly-formatted electronic report (yes/no)? "
+ "Precinct report rejected"), runMain("no", "yes", "no")); + "Is the precinct report a telephoned report (yes/no)? "
+ "Precinct report rejected"),
runMain("no", "yes", "no"));
} }
@Test @Test
public void testAcquireWithRotation() { public void testDuplicatedReportNotOnCaucusDay() {
assertEquals(assemble("Is today a caucus day (yes/no)? " 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)? " + "Is the precinct report a correctly-formatted electronic report (yes/no)? "
+ "Precinct report rejected"), runMain("no", "yes", "yes")); + "Is the precinct report a telephoned report (yes/no)? "
+ "Precinct report rejected"),
runMain("no", "yes", "yes"));
} }
@Test @Test
public void testTrackWithNoRotation() { public void testInvalidReportOnCaucusDay() {
assertEquals(assemble("Is today a caucus day (yes/no)? " 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)? " + "Is the precinct report a correctly-formatted electronic report (yes/no)? "
+ "Precinct report rejected"), runMain("yes", "no", "no")); + "Is the precinct report a telephoned report (yes/no)? "
+ "Precinct report rejected"),
runMain("yes", "no", "no"));
} }
@Test @Test
public void testTrackWithSTTRotation() { public void testTelephoneReportOnCaucusDay() {
assertEquals(assemble("Is today a caucus day (yes/no)? " 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)? " + "Is the precinct report a correctly-formatted electronic report (yes/no)? "
+ "Precinct report accepted"), runMain("yes", "no", "yes")); + "Is the precinct report a telephoned report (yes/no)? "
+ "Precinct report accepted"),
runMain("yes", "no", "yes"));
} }
@Test @Test
public void testTrackWithIRURotation() { public void testWellFormattedElectronicReportOnCaucusDay() {
assertEquals(assemble("Is today a caucus day (yes/no)? " 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)? " + "Is the precinct report a correctly-formatted electronic report (yes/no)? "
+ "Precinct report accepted"), runMain("yes", "yes", "no")); + "Is the precinct report a telephoned report (yes/no)? "
+ "Precinct report accepted"),
runMain("yes", "yes", "no"));
} }
@Test @Test
public void testTrackWithRotation() { public void testDuplicatedReportOnCaucusDay() {
assertEquals(assemble("Is today a caucus day (yes/no)? " 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)? " + "Is the precinct report a correctly-formatted electronic report (yes/no)? "
+ "Precinct report accepted"), runMain("yes", "yes", "yes")); + "Is the precinct report a telephoned report (yes/no)? "
+ "Precinct report accepted"),
runMain("yes", "yes", "yes"));
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment