public static void main (String[] args) throws Throwable { TestSuite theSuite; if (args.length > 0) { theSuite = new TestSuite (); for (int i = 0; i < args.length; i++) { theSuite.addTest (new TestAlphabet (args[i])); } } else { theSuite = (TestSuite) suite (); } junit.textui.TestRunner.run (theSuite); }
public void testNotFound () { Alphabet dict = new Alphabet (); dict.lookupIndex ("TEST1"); dict.lookupIndex ("TEST2"); dict.lookupIndex ("TEST3"); assertEquals (-1, dict.lookupIndex ("TEST4", false)); assertEquals (3, dict.size()); assertEquals (3, dict.lookupIndex ("TEST4", true)); }
public void testReadResolve () throws IOException, ClassNotFoundException { Alphabet dict = new Alphabet (); dict.lookupIndex ("TEST1"); dict.lookupIndex ("TEST2"); dict.lookupIndex ("TEST3"); Alphabet dict2 = (Alphabet) TestSerializable.cloneViaSerialization (dict); assertTrue (dict == dict2); }
public void testNotFound () { Alphabet dict = new Alphabet (); dict.lookupIndex ("TEST1"); dict.lookupIndex ("TEST2"); dict.lookupIndex ("TEST3"); assertEquals (-1, dict.lookupIndex ("TEST4", false)); assertEquals (3, dict.size()); assertEquals (3, dict.lookupIndex ("TEST4", true)); }
public void testReadResolve () throws IOException, ClassNotFoundException { Alphabet dict = new Alphabet (); dict.lookupIndex ("TEST1"); dict.lookupIndex ("TEST2"); dict.lookupIndex ("TEST3"); Alphabet dict2 = (Alphabet) TestSerializable.cloneViaSerialization (dict); assertTrue (dict == dict2); }
public static void main (String[] args) throws Throwable { TestSuite theSuite; if (args.length > 0) { theSuite = new TestSuite (); for (int i = 0; i < args.length; i++) { theSuite.addTest (new TestAlphabet (args[i])); } } else { theSuite = (TestSuite) suite (); } junit.textui.TestRunner.run (theSuite); }