Examples of TestUtilities


Examples of org.apache.cxf.test.TestUtilities

public class SchemaAddinsTest extends Assert {
    private TestUtilities testUtilities;
   
    @Before
    public void before() {
        testUtilities = new TestUtilities(getClass());
        testUtilities.addDefaultNamespaces();
    }
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities

    private TestUtilities testUtilities;
    private XMLOutputFactory xmlOutputFactory;
   
    @Before
    public void before() {
        testUtilities = new TestUtilities(getClass());
        testUtilities.addNamespace("test", "urn:test");
        xmlOutputFactory = XMLOutputFactory.newInstance();
    }
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities

    private MtomTestService client;
    private MtomTestService jaxwsClient;
    private TestUtilities testUtilities;

    public MtomTest() {
        testUtilities = new TestUtilities(getClass());
    }
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities

   
    @Test
    public void testWSDL() throws Exception {
        URL url = new URL("http://localhost:" + PORT + "/jaxwsAndAegis?wsdl");
        Document dom = StaxUtils.read(url.openStream());
        TestUtilities util = new TestUtilities(this.getClass());
        util.addDefaultNamespaces();
        util.assertInvalid("//wsdl:definitions/wsdl:types/xsd:schema/"
                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
                           + "xsd:sequence/xsd:element[@maxOccurs]",
                           dom);
        util.assertValid("//wsdl:definitions/wsdl:types/xsd:schema/"
                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
                           + "xsd:sequence/xsd:element[@nillable='true']",
                           dom);
       
        url = new URL("http://localhost:" + PORT + "/serviceWithCustomNS?wsdl");
        dom = StaxUtils.read(url.openStream());
        util.assertValid("//wsdl:definitions[@targetNamespace='http://foo.bar.com']",
                         dom);
    }
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities

   
    @Test
    public void testGeneratedWsdlNs() throws Exception {
        URL url = new URL("http://localhost:" + PORT + "/aegisJaxWsWSDLNS?wsdl");
        Document dom = StaxUtils.read(url.openStream());
        TestUtilities util = new TestUtilities(this.getClass());
        util.addDefaultNamespaces();
        util.assertValid(
                         "//wsdl:definitions[@targetNamespace"
                         + "='http://v1_1_2.rtf2pdf.doc.ws.daisy.marbes.cz']",
                         dom);
        //should be a targetNamespace for "http://wo.rtf2pdf.doc.ws.daisy.marbes.cz"
        //as VO type specified in the SEI
        util.assertValid("//wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace"
                         + "='http://wo.rtf2pdf.doc.ws.daisy.marbes.cz']",
                         dom);
    }
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities

   
    @Test
    public void testWSDL() throws Exception {
        URL url = new URL("http://localhost:9002/jaxwsAndAegis?wsdl");
        Document dom = XMLUtils.parse(url.openStream());
        TestUtilities util = new TestUtilities(this.getClass());
        util.addDefaultNamespaces();
        util.assertInvalid("//wsdl:definitions/wsdl:types/xsd:schema/"
                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
                           + "xsd:sequence/xsd:element[@maxOccurs]",
                           dom);
        util.assertValid("//wsdl:definitions/wsdl:types/xsd:schema/"
                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
                           + "xsd:sequence/xsd:element[@nillable='true']",
                           dom);
       
        url = new URL("http://localhost:9002/serviceWithCustomNS?wsdl");
        dom = XMLUtils.parse(url.openStream());
        util.assertValid("//wsdl:definitions[@targetNamespace='http://foo.bar.com']",
                         dom);
    }
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities

   
    @Test
    public void testWSDL() throws Exception {
        URL url = new URL("http://localhost:9002/jaxwsAndAegis?wsdl");
        Document dom = XMLUtils.parse(url.openStream());
        TestUtilities util = new TestUtilities(this.getClass());
        util.addDefaultNamespaces();
        util.assertInvalid("//wsdl:definitions/wsdl:types/xsd:schema/"
                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
                           + "xsd:sequence/xsd:element[@maxOccurs]",
                           dom);
        util.assertValid("//wsdl:definitions/wsdl:types/xsd:schema/"
                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
                           + "xsd:sequence/xsd:element[@nillable='true']",
                           dom);
       
        url = new URL("http://localhost:9002/serviceWithCustomNS?wsdl");
        dom = XMLUtils.parse(url.openStream());
        util.assertValid("//wsdl:definitions[@targetNamespace='http://foo.bar.com']",
                         dom);
    }
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities

    private TestService testClient;
    private TestUtilities testUtilities;

    public TestServiceTest() {
        setAutowireMode(AbstractDependencyInjectionSpringContextTests.AUTOWIRE_BY_NAME);
        testUtilities = new TestUtilities(getClass());
    }
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities

    private TestUtilities testUtilities;

    public CrossSchemaImportsTests() {
        setAutowireMode(AbstractDependencyInjectionSpringContextTests.AUTOWIRE_BY_NAME);
        testUtilities = new TestUtilities(getClass());
    }
View Full Code Here

Examples of org.apache.cxf.test.TestUtilities

   
    @Test
    public void testWSDL() throws Exception {
        URL url = new URL("http://localhost:" + PORT + "/jaxwsAndAegis?wsdl");
        Document dom = XMLUtils.parse(url.openStream());
        TestUtilities util = new TestUtilities(this.getClass());
        util.addDefaultNamespaces();
        util.assertInvalid("//wsdl:definitions/wsdl:types/xsd:schema/"
                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
                           + "xsd:sequence/xsd:element[@maxOccurs]",
                           dom);
        util.assertValid("//wsdl:definitions/wsdl:types/xsd:schema/"
                           + "xsd:complexType[@name='getRolesAsArrayResponse']/"
                           + "xsd:sequence/xsd:element[@nillable='true']",
                           dom);
       
        url = new URL("http://localhost:" + PORT + "/serviceWithCustomNS?wsdl");
        dom = XMLUtils.parse(url.openStream());
        util.assertValid("//wsdl:definitions[@targetNamespace='http://foo.bar.com']",
                         dom);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.