Exemple #1
0
        public void LifePreset_Should_CorrectlyBornCells()
        {
            var lifePreset = new LifePreset(_bornValues, _surviveValues);

            lifePreset.Should().NotBeNull();
            for (var pos = 0; pos < 10; pos++)
            {
                var actualResult   = lifePreset.Born(pos);
                var expectedResult = _bornValues.Contains(pos);

                actualResult.Should().Be(expectedResult);

                actualResult   = lifePreset.Survive(pos);
                expectedResult = _surviveValues.Contains(pos);

                actualResult.Should().Be(expectedResult);
            }
        }
Exemple #2
0
        public void LifePreset_Should_BeInitialize()
        {
            var lifePreset = new LifePreset(_bornValues, _surviveValues);

            lifePreset.Should().NotBeNull();
        }