From f8b3d7e77c565b9e5ff885e7694483cde7333972 Mon Sep 17 00:00:00 2001 From: Anudip Chauhan <achauha3@myune.edu.au> Date: Wed, 31 Jul 2024 14:20:08 +0545 Subject: [PATCH] add unit test --- src/test/java/dotsandboxes/DotsAndBoxesGridTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/dotsandboxes/DotsAndBoxesGridTest.java b/src/test/java/dotsandboxes/DotsAndBoxesGridTest.java index ad34020..a7c15a5 100644 --- a/src/test/java/dotsandboxes/DotsAndBoxesGridTest.java +++ b/src/test/java/dotsandboxes/DotsAndBoxesGridTest.java @@ -32,13 +32,13 @@ public class DotsAndBoxesGridTest { public void testBoxCompletionDetection() { DotsAndBoxesGrid grid = new DotsAndBoxesGrid(4, 3, 2); - // Draw only three sides of a box (not completing it) + // Draw four sides of a box (not completing it) grid.drawHorizontal(0, 0, 1); // Top grid.drawVertical(0, 0, 1); // Left grid.drawHorizontal(0, 1, 1); // Bottom + grid.drawVertical(1,0,1); //Right - // Check if the box at (0, 0) is incorrectly identified as completed - assertTrue(grid.boxComplete(0, 0), "The box should not be completed."); + assertTrue(grid.boxComplete(0, 0), "The box should be completed."); } -- GitLab