public void Initialize_AddsLessThanRule_WhenCalled() { // Arrange CellInformation info = CreateCellInformation(); UnderpopulationRule sut = CreateSut(); // Act sut.Initialize(info); // Assert sut.GetConditions().Last().ShouldBeInstanceOf <IsLessThan>(); }
public void Initialize_AddsConditions_WhenCalled() { // Arrange CellInformation info = CreateCellInformation(); UnderpopulationRule sut = CreateSut(); // Act sut.Initialize(info); // Assert sut.GetConditions().Count().ShouldEqual(1); }
public void IsValid_ReturnsTrueOrFalse_ForGivenNeighbours(int neighbours, bool expected) { // Arrange CellInformation info = CreateCellInformation(neighbours); UnderpopulationRule sut = CreateSut(); sut.Initialize(info); // Act bool actual = sut.IsValid(); // Assert Assert.Equal(expected, actual); }