FileDocCategorySizeDatePackage
CreateDomainCommandTest.javaAPI DocGlassfish v2 API4248Fri May 04 22:25:18 BST 2007com.sun.enterprise.cli.commands

CreateDomainCommandTest

public class CreateDomainCommandTest extends TestCase
Execute these tests using gmake (and Ant) by: cd gmake ANT_TARGETS=CommandTest.java

Fields Summary
CreateDomainCommand
testCommand
Constructors Summary
public CreateDomainCommandTest(String name)

        super(name);
    
Methods Summary
public static voidmain(java.lang.String[] args)

        final TestRunner runner= new TestRunner();
        final TestResult result = runner.doRun(CreateDomainCommandTest.suite(), false);
        System.exit(result.errorCount() + result.failureCount());
    
private voidnyi()

        fail("Not Yet Implemented");
    
protected voidsetUp()

    
        
        final CLIDescriptorsReader cliDescriptorsReader = CLIDescriptorsReader.getInstance();
        ValidCommand validCommand = cliDescriptorsReader.getCommand(null);
        LocalStringsManagerFactory.setCommandLocalStringsManagerProperties(
                CLIDescriptorsReader.getInstance().getProperties());
        testCommand = new CreateDomainCommand() {
            public void runCommand()
            throws CommandException, CommandValidationException {
            }
            public boolean validateOptions() throws CommandValidationException {
                return true;
            }
        };
        testCommand.setName("sampleCommand");
    
public static junit.framework.Testsuite()

        TestSuite suite = new TestSuite(BackupCommandsTest.class);
        return suite;
    
protected voidtearDown()

    
public voidtestgetAdminPasswordFromCommandLine()

        testCommand.setOption("adminpassword", "test_password");
        String pwd = testCommand.getAdminPassword();
        assertEquals(pwd, "test_password");