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 DottedNamesCommand();
testCommand.setName("sampleCommand");
|
public static junit.framework.Test | suite()
TestSuite suite = new TestSuite(BackupCommandsTest.class);
return suite;
|
protected void | tearDown()
|
public void | testValidateOptions()
testCommand.setName("set");
assertEquals(testCommand.validateOptions(), true);
|
public void | testValidateOptionsWithFailureCase()
testCommand.setName("get");
testCommand.setOption("monitor", "true");
testCommand.setOption("iterations", "1");
testCommand.setOption("interval", "0");
assertEquals(testCommand.validateOptions(), false);
|
public void | testcheckPropertyToConvertInvalid()
assertEquals(testCommand.checkPropertyToConvert("server.jdbc-resource.jdbc1.property.xyz"), false);
|
public void | testcheckPropertyToConvertValid()
assertEquals(testCommand.checkPropertyToConvert("server.jdbc-resource.jdbc1.property"), true);
|
public void | testconvertUnderscoreToHyphenWithEquals()
String value = testCommand.convertUnderscoreToHyphen("server.jdbc-resource.jdbc1.attr_1=value");
assertEquals(value, "server.jdbc-resource.jdbc1.attr-1=value");
|
public void | testconvertUnderscoreToHyphenWithoutEquals()
String value = testCommand.convertUnderscoreToHyphen("server.jdbc-resource.jdbc1.attr_1");
assertEquals(value, "server.jdbc-resource.jdbc1.attr-1");
|