Skip to content
Snippets Groups Projects
Commit fbe4d889 authored by Matthew Trippe's avatar Matthew Trippe
Browse files

Fixed my missing throw message

parent 13feb624
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@ public class DotsAndBoxesGridTest {
*
* This is a dummy test just to show that the test suite itself runs
*/
@Test
public void testTestSuiteRuns() {
logger.info("Dummy test to show the test suite runs");
......@@ -54,7 +55,7 @@ public class DotsAndBoxesGridTest {
@Test
public void testDrawLine() {
logger.info("Dummy test to show the Exception test runs");
logger.info("This test makes sure theres no existing lines");
// set up the test box
DotsAndBoxesGrid grid = new DotsAndBoxesGrid(10,10,2);
......@@ -64,7 +65,8 @@ public class DotsAndBoxesGridTest {
grid.drawVertical(0,0,1);
// redraw lines to throw the exceptions
assertThrows(IllegalStateException.class, () -> grid.drawHorizontal(0,0,1));
assertThrows(IllegalStateException.class, () -> grid.drawVertical(0,0,1));
assertThrows(IllegalStateException.class, () -> grid.drawHorizontal(0,0,1), "A horizontal line already exists");
assertThrows(IllegalStateException.class, () -> grid.drawVertical(0,0,1), "A vertical line already exists");
}
}
//IllegalStateException exception =
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment