Esempio n. 1
0
        public void Dead_cell_with_3_neighbours_is_born()
        {
            // Arrange
            var cell = new EmptyCell();

            // Act
            var newCell = cell.Evolve(3);

            // Assert
            newCell.ShouldBeOfType <LivingCell>();
        }
Esempio n. 2
0
        public void Living_cell_with_4_or_more_neighbours_dies(int neighbours)
        {
            // Arrange
            var cell = new EmptyCell();

            // Act
            var newCell = cell.Evolve(neighbours);

            // Assert
            newCell.ShouldBeOfType <EmptyCell>();
        }
Esempio n. 3
0
        public void Dead_cell_with_greater_than_3_neighbours_stays_dead(int neighbours)
        {
            // Arrange
            var cell = new EmptyCell();

            // Act
            var newCell = cell.Evolve(neighbours);

            // Assert
            newCell.ShouldBeOfType <EmptyCell>();
        }