Example #1
0
        public void ReturnOneAliveCell_WhenRawFieldContainsOneAliveCell()
        {
            char[,] rawField = { { '*' } };
            var repository = new FieldRepository(rawField);

            var aliveCellsCount = repository.GetAliveCellsCount();

            Assert.AreEqual(1, aliveCellsCount);
        }
Example #2
0
        public void ReturnZeroAliveCells_WhenRAwFieldContainsOneDeadCell()
        {
            char[,] rawField = { { '.' } };
            var repository = new FieldRepository(rawField);

            var aliveCellsCount = repository.GetAliveCellsCount();

            Assert.AreEqual(0, aliveCellsCount);
        }