Methods Summary |
---|
public static void | main(java.lang.String[] args)
final TestRunner runner= new TestRunner();
final TestResult result = runner.doRun(BackupCommandsTest.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 BackupCommands();
testCommand.setName("sampleCommand");
|
public static junit.framework.Test | suite()
TestSuite suite = new TestSuite(BackupCommandsTest.class);
return suite;
|
protected void | tearDown()
|
public void | testValidateOptionsInvalidCommandName()
try{
testCommand.validateOptions();
}
catch (CommandValidationException cve){
assertEquals(cve.getMessage(),
"There is no such command sampleCommand. Use \"asadmin help\" for a list of valid commands.");
}
|
public void | testValidateOptionsInvalidDomainPath()
try{
testCommand.setName("backup-domain");
testCommand.setOption("domaindir", "InvalidDomainDir");
testCommand.validateOptions();
}
catch (CommandValidationException cve){
assertEquals(cve.getMessage(),
"com.sun.enterprise.cli.framework.CommandException: Domain directory "+
new File("InvalidDomainDir").getAbsolutePath() +" is not a directory or does not exist.");
}
|