Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import static org.junit.Assert.*;
- import java.util.ArrayList;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
- public class TrieStructureTest
- {
- @Before
- public void setUp() throws Exception
- {
- }
- @After
- public void tearDown() throws Exception
- {
- }
- @Test
- public void testPutWord()
- {
- TrieStructure x = new TrieStructure();
- ArrayList<Integer> y;
- assertTrue(x.putWord("chuka", 25));
- assertTrue(x.putWord("cab", 30));
- assertTrue(x.putWord("0chuka", 10));
- assertTrue(x.putWord("xylophone", 17));
- assertTrue(x.putWord("random", 1000));
- assertTrue(x.getWordIndexes("chuka").contains(25));
- assertTrue(x.getWordIndexes("xylophone").contains(17));
- // assertFalse(x.putWord("", 21));
- }
- }
Add Comment
Please, Sign In to add comment