Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Below is a MazeSolverTest, Finish the TODO item listed. import org.junit.Test; import static org.junit.Assert.*; public class MazeTest { @Test public void testMazeGeta() { final String[]

Below is a MazeSolverTest, Finish the TODO item listed. import org.junit.Test; import static org.junit.Assert.*; public class MazeTest { @Test public void testMazeGeta() { final String[] data = {"***", "*..", "***"}; final Maze sut = new Maze(data); assertEquals(Maze.EMPTY, sut.get(1, 1)); assertEquals(Maze.WALL, sut.get(0, 0)); } @Test(expected = IndexOutOfBoundsException.class) public void testMazeGetb() { final String[] data = {"***", "*..", "***"}; final Maze sut = new Maze(data); sut.get(3, 4); } @Test public void testMaze1x1a() { final String[] data = {"*"}; final Maze sut = new Maze(data); assertFalse(sut.solve(0, 0)); } @Test public void testMaze1x1b() { final String[] data = {"."}; final Maze sut = new Maze(data); assertTrue(sut.solve(0, 0)); } @Test public void testMaze3x3a() { final String[] data = {"***", "*.*", "***"}; final Maze sut = new Maze(data); assertFalse(sut.solve(1, 1)); } @Test public void testMaze3x3b() { final String[] data = {"***", "*..", "***"}; final Maze sut = new Maze(data); assertTrue(sut.solve(1, 1)); assertEquals(Maze.VISITED, sut.get(1, 2)); } // TODO add at least four tests: // one for maze1 and and one for a copy of maze1 but with the exit blocked // one for your own maze2, // which should have at least two exits and size 10x10 or larger, // and and one for a copy of maze2 but with all exits blocked }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions

Question

If you were Dans friend, what might you say to alter his behaviors?

Answered: 1 week ago