コード例 #1
0
        public void InfiniteBoardEnsureTheWorldHasZeroCells()
        {
            InfiniteBoard world = new InfiniteBoard();
            int expectedNumberOfCells = 0;
            int actualNumberOfCells = world.CellCount();

            Assert.AreEqual(expectedNumberOfCells, actualNumberOfCells);
        }
コード例 #2
0
        public void InfiniteBoardEnsureThereAreCells()
        {
            InfiniteBoard world = new InfiniteBoard();

            int x = 4;
            int y = 3;
            world.AddCell(x, y);

            Assert.AreEqual(1, world.CellCount());
        }
コード例 #3
0
 public void InfiniteBoardTestRemoveCell()
 {
     InfiniteBoard world = new InfiniteBoard();
     world.AddCell(0, 0);
     world.RemoveCell(0, 0);
     Assert.IsFalse(world.CellDoesExist(0, 0));
     Assert.AreEqual(0, world.CellCount());
 }