public void Initialize_AddsMoreThanRule_WhenCalled() { // Arrange CellInformation info = CreateCellInformation(); NewbornRule sut = CreateSut(); // Act sut.Initialize(info); // Assert sut.GetConditions().First().ShouldBeInstanceOf <IsEqual>(); }
public void Initialize_AddsConditions_WhenCalled() { // Arrange CellInformation info = CreateCellInformation(); NewbornRule 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); NewbornRule sut = CreateSut(); sut.Initialize(info); // Act bool actual = sut.IsValid(); // Assert Assert.Equal(expected, actual); }