Skip to content
Snippets Groups Projects
Commit c369e303 authored by Krishkumar Sandipkumar Patel's avatar Krishkumar Sandipkumar Patel
Browse files

Added a test to check whether the game completes a box upon adding just one...

Added a test to check whether the game completes a box upon adding just one horizontal line. The test fails.
parent 222de015
No related branches found
No related tags found
No related merge requests found
......@@ -28,4 +28,14 @@ public class DotsAndBoxesGridTest {
}
// FIXME: You need to write tests for the two known bugs in the code.
/** this tests whether drawing just a horitonal line at coordinate (0,0)
* completes a box at coordinate (0,0) or not.
* The game shouldn't complete a box and return false. */
@DisplayName("Just horizontal line at [0][0], complete a box at [0][0]")
@Test
public void testBoxComplete() {
DotsAndBoxesGrid grid = new DotsAndBoxesGrid(4, 3, 2);
grid.drawHorizontal(0, 0, 1);
assertEquals(false, grid.boxComplete(0, 0));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment