Methods Summary |
---|
public static void | main(java.lang.String[] args)
final TestRunner runner= new TestRunner();
final TestResult result = runner.doRun(UnsetCommandTest.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 UnsetCommand();
testCommand.setName("sampleCommand");
|
public static junit.framework.Test | suite()
TestSuite suite = new TestSuite(UnsetCommandTest.class);
return suite;
|
protected void | tearDown()
|
public void | testrunCommandInvalidPrefix()
try{
Vector operands = new Vector();
operands.add("_ADMIN_INTERACTIVE");
testCommand.setOperands(operands);
testCommand.runCommand();
}catch(CommandException ce){
assertEquals(ce.getMessage(), "CLI163 Could not unset environment variable, _ADMIN_INTERACTIVE.");
}
|
public void | testrunCommandRemoveEnvVariables()
Vector operands = new Vector();
System.setProperty("user.home", System.getProperty("java.io.tmpdir"));//tempDir.getPath());
operands.add("AS_ADMIN_USER");
operands.add("AS_ADMIN_PASSWORD");
testCommand.setOperands(operands);
CommandEnvironment.getInstance().setEnvironment("user", "admin");
CommandEnvironment.getInstance().setEnvironment("password", "adminadmin");
testCommand.runCommand();
assertEquals(testCommand.getOption("user"), null);
assertEquals(testCommand.getOption("password"), null);
|
public void | testrunCommandRemoveEnvVariablesWithWildCard()
Vector operands = new Vector();
System.setProperty("user.home", System.getProperty("java.io.tmpdir"));
operands.add("AS_ADMIN_*");
testCommand.setOperands(operands);
CommandEnvironment.getInstance().setEnvironment("user", "admin");
CommandEnvironment.getInstance().setEnvironment("password", "adminadmin");
testCommand.runCommand();
assertEquals(testCommand.getOption("user"), null);
assertEquals(testCommand.getOption("password"), null);
|
public void | testrunCommandRemoveNonExistingEnvVariable()
try{
Vector operands = new Vector();
operands.add("AS_ADMIN_INTERACTIVE");
testCommand.setOperands(operands);
testCommand.runCommand();
}catch(CommandException ce){
assertEquals(ce.getMessage(), "CLI149 Unable to remove environment variable, " +
"AS_ADMIN_INTERACTIVE.");
}
|