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

StopDomainCommandTest

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

Fields Summary
StopDomainCommand
testCommand
Constructors Summary
public StopDomainCommandTest(String name)

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

        final TestRunner runner= new TestRunner();
        final TestResult result = runner.doRun(StopDomainCommandTest.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 StopDomainCommand();
        testCommand.setName("sampleCommand");
    
public static junit.framework.Testsuite()

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

    
public voidtestrunCommandNoDomains()

        try{
            Vector operands = new Vector();
            operands.add("UndefinedDomain");
            testCommand.setOperands(operands);
            testCommand.runCommand();
        } catch (Exception e)
        {
            assertEquals(e.getMessage(), "CLI157 Could not stop the domain UndefinedDomain.");
        }