Exemplo n.º 1
0
        public void ContinueToLiveTest(int neighorCount)
        {
            // Given
            var cell = new LiveCell(neighorCount);

            // When
            var nextGenDeath = cell.WillThisCellSurvive();

            // Then
            Assert.IsFalse(nextGenDeath, "Cell should lived but it died");
        }
Exemplo n.º 2
0
        public void OverpopulationTest([Values(4, 5, 6, 7, 8)] int neighborCount)
        {
            // Given
            var cell = new LiveCell(neighborCount);

            // When
            var nextGenDeath = cell.WillThisCellSurvive();

            // Then
            Assert.IsTrue(nextGenDeath, "Cell should have died, but lived");
        }
Exemplo n.º 3
0
        public void UnderPopulationTest(int neighorCount)
        {
            // Given
            var cell = new LiveCell(neighorCount);

            // When
            var nextGenDeath = cell.WillThisCellSurvive();

            // Then
            Assert.IsTrue(nextGenDeath, "Cell should have died but it lived.");
        }