Methods Summary |
---|
public static void | assertFalse(boolean t)
assertTrue(!t);
|
public static void | main(java.lang.String[] args)
if (args.length == 0){
junit.textui.TestRunner.run(OptionsMapTest.class);
} else {
junit.textui.TestRunner.run(makeSuite(args));
}
|
private static junit.framework.TestSuite | makeSuite(java.lang.String[] args)
final TestSuite ts = new TestSuite();
for (int i = 0; i < args.length; i++){
ts.addTest(new OptionsMapTest(args[i]));
}
return ts;
|
private void | nyi()
fail("Not Yet Implemented");
|
protected void | setUp()
om = new OptionsMap();
om.addOptionValue("one", "1");
om.addCLValue("two", "2");
om.addEnvValue("three", "3");
om.addPrefValue("four", "4");
om.addDefaultValue("five", "5");
|
protected void | tearDown()
|
public void | testContainsName()
assertTrue(om.containsName("one"));
assertFalse(om.containsName("ten"));
|
public void | testGetCLOptions()
Map m = new HashMap();
m.put("two", "2");
assertEquals(m, om.getCLOptions());
|
public void | testGetDefaultOptions()
Map m = new HashMap();
m.put("five", "5");
assertEquals(m, om.getDefaultOptions());
|
public void | testGetEnvOptions()
Map m = new HashMap();
m.put("three", "3");
assertEquals(m, om.getEnvOptions());
|
public void | testGetOption()
assertEquals("1", om.getOption("one"));
assertEquals("2", om.getOption("two"));
assertEquals("3", om.getOption("three"));
assertEquals("4", om.getOption("four"));
assertEquals("5", om.getOption("five"));
|
public void | testGetOptions()
Map m = new HashMap();
m.put("one", "1");
m.put("two", "2");
m.put("three", "3");
m.put("four", "4");
m.put("five", "5");
assertEquals(m, om.getOptions());
|
public void | testGetOtherOptions()
Map m = new HashMap();
m.put("one", "1");
assertEquals(m, om.getOtherOptions());
|
public void | testNameSet()
Set<String> s = new HashSet<String>();
s.add("one");
s.add("two");
s.add("three");
s.add("four");
s.add("five");
assertEquals(s, om.nameSet());
|
public void | testRemove()
om.addOptionValue("six", "6");
assertTrue(om.containsName("six"));
om.remove("six");
assertFalse(om.containsName("six"));
|
public void | testToString()
assertEquals("<one,1>\n<two,2>\n<five,5>\n<four,4>\n<three,3>\n", om.toString());
|