Ejemplo n.º 1
0
        public void Universe_Contains_Succeeds(int x, int y, bool result)
        {
            var universe = new Universe();

            universe.Add(42, 1337);

            universe.Contains(x, y).Should().Be(result);
        }
        public void produce_a_next_generation()
        {
            var cell = Substitute.For <Cell>(true);
            var nextGenerationCell = Substitute.For <Cell>(true);

            cell.ToNextGeneration().Returns(nextGenerationCell);
            var cells = new Dictionary <int, Cell> {
                { 0, cell }
            };

            Universe universe     = new Universe(cells);
            Universe nextUniverse = universe.NextGeneration();

            Assert.True(nextUniverse.Contains(nextGenerationCell));
        }