Пример #1
0
        public void ReturnsTrueAndValidSolutionAsOutParamWhenLabyrinthIsCorrect()
        {
            Directions[] directions;
            Directions[] expectedSolution = new Directions[] {
                Directions.Right,
                Directions.Up,
                Directions.Right,
                Directions.Right,
                Directions.Down,
                Directions.Down,
                Directions.Down,
                Directions.Left,
                Directions.Left
            };

            Assert.True(LabyrinthSolver.GetSolution(validLabyrinth, out directions));
            Assert.Same(expectedSolution, directions);
        }
Пример #2
0
 public void ReturnsNullArgumentExceptionIfArgumnentIsNull()
 {
     Directions[] directions;
     Assert.Throws <ArgumentNullException>(() => LabyrinthSolver.GetSolution(null, out directions));
 }