Methods Summary |
---|
public static void | main(java.lang.String[] args)
final TestRunner runner= new TestRunner();
final TestResult result = runner.doRun(GenerateReportCommandTest.suite(), false);
System.exit(result.errorCount() + result.failureCount());
|
private void | nyi()
fail("Not Yet Implemented");
|
protected void | setUp()
//Properties systemProperties = new java.util.Propertis();
//systemProperties.put("com.sun.aas.configRoot",)
//String configProperty = SystemPropertyConstants.CONFIG_ROOT_PROPERTY;
//System.out.println(configProperty + " = " + System.getProperty(configProperty));
final CLIDescriptorsReader cliDescriptorsReader = CLIDescriptorsReader.getInstance();
ValidCommand validCommand = cliDescriptorsReader.getCommand(null);
LocalStringsManagerFactory.setCommandLocalStringsManagerProperties(
CLIDescriptorsReader.getInstance().getProperties());
testCommand = new GenerateReportCommand();
testCommand.setName("sampleCommand");
|
public static junit.framework.Test | suite()
TestSuite suite = new TestSuite(GenerateReportCommandTest.class);
return suite;
|
protected void | tearDown()
|
public void | testvalidateOptionsInvalidLogEndDate()
try{
testCommand.setOption("local", "true");
testCommand.setOption("targetdir", "currentdir");
testCommand.setOption("logstartdate", "10202004");
testCommand.validateOptions();
}catch (CommandValidationException cve){
assertEquals(cve.getMessage(), "optionrequiredwithoption");
}
|
public void | testvalidateOptionsInvalidTarget()
try{
testCommand.setOption("local", "true");
testCommand.validateOptions();
}catch (CommandValidationException cve){
assertEquals(cve.getMessage(), "CLI179 option targetdir required in local mode");
}
|
public void | testvalidateOptionsValid()
testCommand.setOption("local", "true");
testCommand.setOption("targetdir", "currentdir");
testCommand.setOption("logstartdate", "10202004");
testCommand.setOption("logenddate", "10212004");
assertEquals(testCommand.validateOptions(), true);
|