public void SF_CreateSolverTest_type_01()
        {
            string testObject = "SWA.Ariadne.Logic.SolverFactory.CreateSolver(type)";

            foreach (Type solverType in SolverFactory.SolverTypes)
            {
                Maze        maze       = NewMaze();
                IMazeDrawer mazeDrawer = null;
                IMazeSolver actual     = SWA_Ariadne_Logic_SolverFactoryAccessor.CreateSolver(solverType, maze, mazeDrawer);

                Assert.IsInstanceOfType(actual, typeof(IMazeSolver), testObject + " did not return an instanze of IMazeSolver");
                Assert.IsInstanceOfType(actual, solverType, testObject + " did not return the given type");
            }
        }
Beispiel #2
0
        public void SB_SolveTest_01()
        {
            string testObject = "SWA.Ariadne.Logic.SolverBase.Solve";

            foreach (Type solverType in SolverFactory.SolverTypes)
            {
                Maze        maze       = SolverFactoryTest.NewMaze();
                IMazeDrawer mazeDrawer = null;
                IMazeSolver target     = SWA_Ariadne_Logic_SolverFactoryAccessor.CreateSolver(solverType, maze, mazeDrawer);
                target.Solve();

                Assert.IsTrue(maze.IsSolved, testObject + ": " + target.GetType().Name + " did not solve the maze.");
            }
        }