Пример #1
0
        public void Guaranteed_cells_are_calculated_correctly(string expectedAnswer, int length, params int[] hints)
        {
            var solver = new GuaranteedCellSolver();

            var cellCollection = new CellCollection(0, hints, CreateCellCollection(length));

            solver.Solve(cellCollection);

            Assert.That(cellCollection.ToString(), Is.EqualTo(expectedAnswer));
        }
Пример #2
0
        public void TrivialLinesAreCalculatedCorrectly(string expectedAnswer, params int[] hints)
        {
            var solver = new TrivialRowSolver();

            var length         = hints.Sum() + hints.Length - 1;
            var cellCollection = new CellCollection(0, hints, CreateCellCollection(length));

            solver.Solve(cellCollection);

            Assert.That(cellCollection.ToString(), Is.EqualTo(expectedAnswer));
        }