From 7f7cc5bb7461a799e0ae7f48063d4c27a4af8192 Mon Sep 17 00:00:00 2001
From: Joshua <jalejand@myune.edu.au>
Date: Wed, 2 Aug 2023 21:25:00 +1000
Subject: [PATCH] Add failing unit tests for assignment bugs

---
 .../dotsandboxes/DotsAndBoxesGridTest.java    | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/test/java/dotsandboxes/DotsAndBoxesGridTest.java b/src/test/java/dotsandboxes/DotsAndBoxesGridTest.java
index 1946bed..c651221 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.
 }
-- 
GitLab