FileDocCategorySizeDatePackage
FastInfosetModelConfiguratorProviderTest.javaAPI DocExample5693Tue May 29 16:57:36 BST 2007com.sun.xml.ws.encoding.policy

FastInfosetModelConfiguratorProviderTest

public class FastInfosetModelConfiguratorProviderTest extends TestCase
Test FastInfoset policy assertion code.
author
Paul.Sandoz@Sun.Com

Fields Summary
Constructors Summary
Methods Summary
public voidtestConfigureFastInfosetAssertionNotPresent()
Test of configure method, of class com.sun.xml.ws.policy.jaxws.encoding.FastInfosetModelConfiguratorProvider. policy assertion not present

        WSDLModel model = getWSDLModel("jaxws-spi/testModelConfigProviderFastInfosetPolicyNotPresent.wsdl");
        PolicyMap policyMap = model.getExtension(WSDLPolicyMapWrapper.class).getPolicyMap();
        
        WSDLService service = model.getService(new QName("http://example.org","DictionaryService"));
        assertNotNull(service);
        
        WSDLPort port = service.getFirstPort();
        assertNotNull(port);
        
        // WSDLBoundPortType binding = port.getBinding();
        // assertNotNull(binding);
        
        WebServiceFeature feature = port.getFeature(FastInfosetFeature.class);
        assertNull(feature);
    
public voidtestConfigureFastInfosetAssertionPresentAndDisabled()
Test of configure method, of class com.sun.xml.ws.policy.jaxws.encoding.FastInfosetModelConfiguratorProvider. policy assertion present and enabled = false

        WSDLModel model = getWSDLModel("jaxws-spi/testModelConfigProviderFastInfosetDisabled.wsdl");
        PolicyMap policyMap = model.getExtension(WSDLPolicyMapWrapper.class).getPolicyMap();
        
        WSDLService service = model.getService(new QName("http://example.org","DictionaryService"));
        assertNotNull(service);
        
        WSDLPort port = service.getFirstPort();
        assertNotNull(port);
        
        // WSDLBoundPortType binding = port.getBinding();
        // assertNotNull(binding);
        
        WebServiceFeature feature = port.getFeature(FastInfosetFeature.class);
        assertNotNull(feature);
        
        assertFalse(feature.isEnabled());
    
public voidtestConfigureFastInfosetAssertionPresentAndEnabled()
Test of configure method, of class com.sun.xml.ws.policy.jaxws.encoding.FastInfosetModelConfiguratorProvider. policy assertion present and enabled = true

        WSDLModel model = getWSDLModel("jaxws-spi/testModelConfigProviderFastInfosetEnabled.wsdl");
        PolicyMap policyMap = model.getExtension(WSDLPolicyMapWrapper.class).getPolicyMap();
        
        WSDLService service = model.getService(new QName("http://example.org","DictionaryService"));
        assertNotNull(service);
        
        WSDLPort port = service.getFirstPort();
        assertNotNull(port);
        
        // WSDLBoundPortType binding = port.getBinding();
        // assertNotNull(binding);
        
        WebServiceFeature feature = port.getFeature(FastInfosetFeature.class);
        assertNotNull(feature);
        
        assertTrue(feature.isEnabled());