コード例 #1
0
ファイル: LivenessRule4Tests.cs プロジェクト: hbiarge/Katas
        public void Apply_Should_Not_Be_Applied_For_NotLive_Cells_With_4_Or_More_Neighbours()
        {
            var sut      = new LivenessRule4();
            var liveCell = new NotAliveCell(new Coordinate(2, 2));

            var willBeAlive = sut.Apply(liveCell, 4);

            willBeAlive.RuleApplied.Should().BeFalse();
        }
コード例 #2
0
ファイル: LivenessRule4Tests.cs プロジェクト: hbiarge/Katas
        public void Apply_Should_Not_Be_Applied_For_Live_Cells()
        {
            var sut       = new LivenessRule4();
            var aliveCell = new AliveCell(new Coordinate(2, 2));

            var willBeAlive = sut.Apply(aliveCell, 3);

            willBeAlive.RuleApplied.Should().BeFalse();
        }
コード例 #3
0
ファイル: LivenessRule4Tests.cs プロジェクト: hbiarge/Katas
        public void Apply_Should_Be_True_For_Non_Live_Cells_With_3_Neighbours()
        {
            var sut      = new LivenessRule4();
            var liveCell = new NotAliveCell(new Coordinate(2, 2));

            var willBeAlive = sut.Apply(liveCell, 3);

            willBeAlive.RuleApplied.Should().BeTrue();
            willBeAlive.CellWillBeAlive.Should().BeTrue();
        }