FileDocCategorySizeDatePackage
TestGlobalConfiguration.javaAPI DocApache Axis 1.42061Sat Apr 22 18:57:28 BST 2006test.wsdd

TestGlobalConfiguration

public class TestGlobalConfiguration extends TestCase

Fields Summary
static final String
PARAM_NAME
static final String
PARAM_VAL
static final String
ROLE
static final String
ROLE2
String
doc
Constructors Summary
public TestGlobalConfiguration(String name)


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

        TestGlobalConfiguration tester = new TestGlobalConfiguration("foo");
        tester.testEngineProperties();
    
protected voidsetup()

    
public static junit.framework.Testsuite()

        return new TestSuite(TestGlobalConfiguration.class);
    
public voidtestEngineProperties()

        XMLStringProvider provider = new XMLStringProvider(doc);
        AxisServer server = new AxisServer(provider);

        Object optVal = server.getOption(PARAM_NAME);
        assertNotNull("Option value was null!", optVal);
        assertEquals("Option was not expected value", optVal, PARAM_VAL);

        optVal = server.getOption("someOptionWhichIsntSet");
        assertNull("Got value for bad option!", optVal);

        List roles = server.getActorURIs();
        assertTrue("Engine roles did not contain " + ROLE,
                   roles.contains(ROLE));
        assertTrue("Engine roles did not contain " + ROLE2,
                   roles.contains(ROLE2));