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(ValidOptionTest.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 ValidOptionTest(args[i]));
}
return ts;
|
private void | nyi()
fail("Not Yet Implemented");
|
protected void | setUp()
vo = new ValidOption();
|
protected void | tearDown()
|
public void | testDefault()
assertFalse(vo.hasDefaultValue());
vo.setDefaultValue("def");
assertEquals("def", vo.getDefaultValue());
assertTrue(vo.hasDefaultValue());
|
public void | testName()
assertNull(vo.getName());
vo.setName("foo");
assertEquals("foo", vo.getName());
|
public void | testRequired()
assertEquals(0, vo.isValueRequired());
vo.setRequired(12345);
assertEquals(12345, vo.isValueRequired());
|
public void | testShortNames()
assertTrue(vo.getShortNames().isEmpty());
assertFalse(vo.hasShortName());
vo.setShortName("foo");
assertEquals(1, vo.getShortNames().size());
assertTrue(vo.getShortNames().contains("foo"));
assertTrue(vo.hasShortName());
|
public void | testToString()
assertEquals("null null null", vo.toString());
vo.setShortName("foo");
assertEquals("null null foo, null", vo.toString());
|
public void | testType()
assertNull(vo.getType());
vo.setType("t1");
assertEquals("t1", vo.getType());
|