01: package com.opensymphony.webwork.util;
02:
03: import junit.framework.TestCase;
04:
05: /**
06: * @author crazybob@google.com (Bob Lee)
07: */
08: public class PrefixTrieTest extends TestCase {
09:
10: public void testPutGet() {
11: PrefixTrie trie = new PrefixTrie();
12: Object foo = new Object();
13: trie.put("foo:", foo);
14: Object a = new Object();
15: trie.put("a:", a);
16: assertSame(foo, trie.get("foo:bar"));
17: assertSame(a, trie.get("a:bar"));
18: assertNull(trie.get("tee:bar"));
19: assertNull(trie.get("foobar"));
20: }
21: }
|