Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class WordSearchSolverTest extends junit.framework.TestCase
- {
- private char board[][];
- private ArrayList<String> wordlist;
- public WordSearchSolverTest()
- {
- }
- /**
- * Sets up the test fixture.
- *
- * Called before every test case method.
- */
- protected void setUp()
- {
- wordlist = new ArrayList<String>();
- }
- public void testOneHorizontal()
- {
- char [][] board = { {'X', 'X','X','X'},
- {'X', 'C','A','T'},
- {'X', 'X','X','X'},
- {'X', 'X','X','X'}};
- wordlist.add("CAT");
- WordSearchSolver ws = new WordSearchSolver(3, board, wordlist);
- ArrayList<PuzzleWord> results = ws.findwords();
- assertEquals("wrong number of results",1,results.size());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement