Skip to content
Snippets Groups Projects
Commit 70984618 authored by Chandana Maturi's avatar Chandana Maturi
Browse files

unit testing failed

parent 18a0a268
No related branches found
No related tags found
No related merge requests found
Pipeline #1609 failed
......@@ -28,4 +28,31 @@ public class DotsAndBoxesGridTest {
}
// FIXME: You need to write tests for the two known bugs in the code.
@Test
public void checkforBoxComplete() {
logger.info("Check wheather the box is complete is wrong or not");
int x = 1;
int y = 1;
int p = 1;
DotsAndBoxesGrid z = new DotsAndBoxesGrid(x, y, p);
assertFalse(z.boxComplete(x, y));
}
@Test
public void testExistingLine() {
logger.info("testing exception is thrown when line exists");
int x = 2;
int y = 3;
int p = 2;
int w = 12;
int h = 3;
DotsAndBoxesGrid z = new DotsAndBoxesGrid(w, h, p);
z.drawHorizontal(x, y, p);
assertThrows(IllegalStateException.class, () -> z.drawHorizontal(x, y, p), "The line exists");
}
}
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