FileDocCategorySizeDatePackage
WebServiceRegistryCommandTest.javaAPI DocGlassfish v2 API4889Fri May 04 22:25:20 BST 2007com.sun.enterprise.cli.commands

WebServiceRegistryCommandTest

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

Fields Summary
WebServiceRegistryCommand
testCommand
Constructors Summary
public WebServiceRegistryCommandTest(String name)

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

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

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


        
        //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 WebServiceRegistryCommand();
        testCommand.setName("sampleCommand");
    
public static junit.framework.Testsuite()

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

    
public voidtestcreateStringArrayParam()

        String[] params = testCommand.createStringArrayParam("value1,value2");
        assertEquals(params[0], "value1");
        assertEquals(params[1], "value2");
    
public voidtestcreateStringArrayParamWithVariable()

        testCommand.setOption("registryjndinames", "value1,value2");
        String[] params = testCommand.createStringArrayParam("{$registryjndinames}");
        assertEquals(params[0], "value1");
        assertEquals(params[1], "value2");