Skip to content
Snippets Groups Projects
Commit 7f7cc5bb authored by Joshua Alejandro's avatar Joshua Alejandro
Browse files

Add failing unit tests for assignment bugs

parent dd02e27b
No related branches found
No related tags found
No related merge requests found
...@@ -27,5 +27,24 @@ public class DotsAndBoxesGridTest { ...@@ -27,5 +27,24 @@ public class DotsAndBoxesGridTest {
assertTrue(true); assertTrue(true);
} }
@Test
public void testSquareIsComplete() {
logger.info("Checking if the game knows a square is complete");
DotsAndBoxesGrid grid = new DotsAndBoxesGrid(15, 8, 2);
grid.drawLine();
assertTrue(true);
}
@Test
public void testLineDrawingException() {
logger.info("Testing IllegalStateException for drawing a line twice");
DotsAndBoxesGrid grid = new DotsAndBoxesGrid(15, 8, 2);
grid.drawLine();
try {
grid.drawLine();
} catch (IllegalStateException e) {
return;
}
f
// FIXME: You need to write tests for the two known bugs in the code. // FIXME: You need to write tests for the two known bugs in the code.
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment