Skip to content

Commit

Permalink
. t draw scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
lexler committed Nov 10, 2023
1 parent 870ff0e commit 3f04c8e
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/test/java/org/samples/SampleTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,20 @@ public void printSimpleBoard() {
Approvals.verify(result);
}



@Test
void whenLifeCellIsInTheMiddleAndItHasNoNeighborTheCellDies() {
int[][] board = new int[3][3];
board[1][1] = 1;
Approvals.verify(printBoard(board));
String result = printBoard(board);
// 000
// 010
// 000

// 000
// 000
// 000

Approvals.verify(result);
}

private static String printBoard(int[][] board) {
Expand All @@ -34,6 +41,7 @@ private static String printBoard(int[][] board) {
}
return result;
}

/**
* note: this requires GSON which is currently added in the pom.xml file.
* This is only required if you want to use the VerifyAsJson.
Expand Down

0 comments on commit 3f04c8e

Please sign in to comment.