Exemplo n.º 1
0
        public void FindParallelCandidatesWithPartParallelsTest()
        {
            List <Cell> cells = new List <Cell>
            {
                new Cell(0, 0, new List <int> {
                    1, 3
                }),
                new Cell(1, 0, new List <int> {
                    1, 2
                }),
                new Cell(2, 0, new List <int> {
                    1, 2
                }),
                new Cell(3, 0, new List <int> {
                    3, 4
                }),
            };

            List <Cell> result = EqualOptionsReducerMock.FindParallelCandidates(cells);

            Assert.Equal(4, result.Count());
            Assert.Equal(new List <int> {
                3
            }, result[0].Candidates);
            Assert.Equal(new List <int> {
                1, 2
            }, result[1].Candidates);
            Assert.Equal(new List <int> {
                1, 2
            }, result[2].Candidates);
            Assert.Equal(new List <int> {
                3, 4
            }, result[3].Candidates);
        }
Exemplo n.º 2
0
        public void FindParallelCandidatesWithNoParallelsTest()
        {
            List <Cell> cells = new List <Cell>
            {
                new Cell(0, 0, new List <int> {
                    1
                }),
                new Cell(1, 0, new List <int> {
                    2
                }),
                new Cell(2, 0, new List <int> {
                    3
                }),
                new Cell(3, 0, new List <int> {
                    4
                }),
            };

            List <Cell> result = EqualOptionsReducerMock.FindParallelCandidates(cells);

            Assert.Empty(result);
        }
Exemplo n.º 3
0
 public static void ConstructorTest()
 {
     Board board = new Board();
     EqualOptionsReducerMock solver = new EqualOptionsReducerMock(board);
 }