diff --git a/src/test/java/dotsandboxes/DotsAndBoxesGridTest.java b/src/test/java/dotsandboxes/DotsAndBoxesGridTest.java index 1946beda974d180686c65c0259a7b881e9a4eb5a..c6512217dfeab139f848d9308dbefc513692f75e 100644 --- a/src/test/java/dotsandboxes/DotsAndBoxesGridTest.java +++ b/src/test/java/dotsandboxes/DotsAndBoxesGridTest.java @@ -27,5 +27,24 @@ public class DotsAndBoxesGridTest { 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. }