Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package io.github.tdudzik.gameoflife;
- import org.testng.annotations.Test;
- import static org.testng.Assert.*;
- public class CellTransformatorTest {
- @Test
- public void transformEmptyCellWithLessThanThreeNeighbours() {
- // given
- CellTransformator cellTransformator = new CellTransformator();
- // when
- Cell cellBeforeTransformation = new Cell();
- Cell cellAfterTransformation = cellTransformator.transform(cellBeforeTransformation);
- // then
- assertThat(cellAfterTransformation.isAlive()).isFalse();
- }
- }
- package io.github.tdudzik.gameoflife;
- public class CellTransformator {
- public Cell transform(Cell cellBeforeTransformation) {
- return null;
- }
- }
- package io.github.tdudzik.gameoflife;
- public final class Cell {
- private final boolean alive;
- public Cell(boolean alive) {
- this.alive = alive;
- }
- public boolean isAlive() {
- return alive;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment