CommandValidatorTestpublic class CommandValidatorTest extends TestCase
Fields Summary |
---|
CommandValidator | cv |
Constructors Summary |
---|
public CommandValidatorTest(String name)
super(name);
|
Methods Summary |
---|
public static void | main(java.lang.String[] args)
if (args.length == 0){
junit.textui.TestRunner.run(CommandValidatorTest.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 CommandValidatorTest(args[i]));
}
return ts;
| private void | nyi()
fail("Not Yet Implemented");
| protected void | setUp()
cv = new CommandValidator();
| protected void | tearDown()
| public void | testValidCommand1()
final Vector vos = new Vector();
vos.add(new ValidOption("vo", "String", 1, ""));
final Vector ros = new Vector();
ros.add(new ValidOption("ro", "Integer", 0, ""));
final Vector dos = new Vector();
final ValidCommand vc = new ValidCommand("name", "3", vos, ros, dos, "useage");
cv.validateCommandAndOptions(vc, new HashMap(),
new Vector(Arrays.asList(new String[] {"1", "2", "3"})));
| public void | testValidCommand2()
final Vector vos = new Vector();
vos.add(new ValidOption("vo", "foo", 0, "value"));
final Vector ros = new Vector();
ros.add(new ValidOption("ro", "fee", 1, "v"));
final Vector dos = new Vector();
final ValidCommand vc = new ValidCommand("name", "*", vos, ros, dos, "useage");
cv.validateCommandAndOptions(vc, new HashMap(), new Vector());
| public void | testValidCommand3()
final Vector vos = new Vector();
vos.add(new ValidOption("vo", "foo", 0, "value"));
final Vector ros = new Vector();
ros.add(new ValidOption("ro", "fee", 1, "v"));
final Vector dos = new Vector();
final ValidCommand vc = new ValidCommand("name", "*", vos, ros, dos, "useage");
cv.validateCommandAndOptions(vc, new HashMap(), new Vector());
| public void | testValidCommandWithSimpleConstructors()
final ValidCommand vc = new ValidCommand();
//cv.validateCommandAndOptions(vc, new HashMap(), new Vector());
|
|