14151617181920
private Rules rules; @Before public void forEachTestCreateRules() { rules = new Rules(State.ALIVE); }
5657585960616263646566
} @Test public void whenDeadCellWithExactlyThreeLivingNeighboursThenItIsReborn() { // arrange - see setup() rules = new Rules(State.DEAD); // act rules.observeNeighbours(3); // assert assertThat(rules.decides(), is(Will.REBORN)); }