Exemplo n.º 1
0
        public void GetRandomCell_ValidInput_ReturnsCellFromMap()
        {
            var map = new Map<Cell>(5, 5);

            var randomizer = new Randomizer();
            var randomCell = randomizer.GetRandomCell(map);

            Assert.AreEqual(map.GetCell(randomCell.Row, randomCell.Column), randomCell);
        }
Exemplo n.º 2
0
        public void GetRandomCell_EmptyMap_ReturnsNull()
        {
            var map = new Map <Cell>(0, 0);

            var randomizer = new Randomizer();
            var randomCell = randomizer.GetRandomCell(map);

            Assert.IsNull(randomCell);
        }
Exemplo n.º 3
0
        public void GetRandomCell_EmptyMap_ReturnsNull()
        {
            var map = new Map<Cell>(0, 0);

            var randomizer = new Randomizer();
            var randomCell = randomizer.GetRandomCell(map);

            Assert.IsNull(randomCell);
        }
Exemplo n.º 4
0
        public void GetRandomCell_ValidInput_ReturnsCellFromMap()
        {
            var map = new Map <Cell>(5, 5);

            var randomizer = new Randomizer();
            var randomCell = randomizer.GetRandomCell(map);

            Assert.AreEqual(map.GetCell(randomCell.Row, randomCell.Column), randomCell);
        }