Examples of FooType


Examples of org.apache.cxf.test.assertions.foo.FooType

        Document doc = DOMUtils.readXml(is);
        Element elem = (Element)doc.getDocumentElement()
            .getElementsByTagNameNS("http://cxf.apache.org/test/assertions/foo", "foo").item(0);
        Assertion a = ab.build(elem);
        JaxbAssertion<FooType> jba = JaxbAssertion.cast(a, FooType.class);
        FooType foo = jba.getData();
        assertEquals("CXF", foo.getName());
        assertEquals(2, foo.getNumber().intValue());        
    }
View Full Code Here

Examples of org.apache.cxf.test.assertions.foo.FooType

        JaxbAssertion<FooType> assertion = new JaxbAssertion<FooType>();
        assertNull(assertion.getName());
        assertNull(assertion.getData());
        assertTrue(!assertion.isOptional());
        assertEquals(Constants.TYPE_ASSERTION, assertion.getType());
        FooType data = new FooType();
        data.setName("CXF");
        data.setNumber(2);
        QName qn = new QName("http://cxf.apache.org/test/assertions/foo", "FooType");
        assertion.setName(qn);
        assertion.setData(data);
        assertion.setOptional(true);
        assertSame(qn, assertion.getName());
View Full Code Here

Examples of org.apache.cxf.test.assertions.foo.FooType

    }
   
    @Test
    public void testEqual() {
        JaxbAssertion<FooType> assertion = new JaxbAssertion<FooType>();
        FooType data = new FooType();
        data.setName("CXF");
        data.setNumber(2);
        QName qn = new QName("http://cxf.apache.org/test/assertions/foo", "FooType");
        assertion.setName(qn);
        assertion.setData(data);
       
        PolicyComponent pc = new Policy();
        assertTrue(!assertion.equal(pc));
        pc = (PolicyComponent)new All();
        assertTrue(!assertion.equal(pc));
        pc = (PolicyComponent)new ExactlyOne();
        assertTrue(!assertion.equal(pc));
       
        IMocksControl ctrl = EasyMock.createNiceControl();
        PrimitiveAssertion xpa = ctrl.createMock(PrimitiveAssertion.class);
        QName oqn = new QName("http://cxf.apache.org/test/assertions/blah", "OtherType");
        EasyMock.expect(xpa.getName()).andReturn(oqn);
        EasyMock.expect(xpa.getType()).andReturn(Constants.TYPE_ASSERTION);
       
        ctrl.replay();
        assertTrue(!assertion.equal(xpa));
        ctrl.verify();
           
        FooType odata = new FooType();
        odata.setName(data.getName());
        odata.setNumber(data.getNumber());
        JaxbAssertion<FooType> oassertion = new JaxbAssertion<FooType>();
        oassertion.setData(odata);
        oassertion.setName(qn);
        assertTrue(!assertion.equal(oassertion))
        oassertion.setData(data);
View Full Code Here

Examples of org.apache.cxf.test.assertions.foo.FooType

    }
   
    @Test
    public void testNormalise() {
        JaxbAssertion<FooType> assertion = new JaxbAssertion<FooType>();
        FooType data = new FooType();
        data.setName("CXF");
        data.setNumber(2);
        QName qn = new QName("http://cxf.apache.org/test/assertions/foo", "FooType");
        assertion.setName(qn);
        assertion.setData(data);

        JaxbAssertion normalised = (JaxbAssertion)assertion.normalize();
View Full Code Here

Examples of org.apache.cxf.test.assertions.foo.FooType

        Document doc = DOMUtils.readXml(is);
        Element elem = (Element)doc.getDocumentElement()
            .getElementsByTagNameNS("http://cxf.apache.org/test/assertions/foo", "foo").item(0);
        PolicyAssertion a = ab.build(elem);
        JaxbAssertion<FooType> jba = JaxbAssertion.cast(a, FooType.class);
        FooType foo = jba.getData();
        assertEquals("CXF", foo.getName());
        assertEquals(2, foo.getNumber().intValue());        
    }
View Full Code Here

Examples of org.apache.cxf.test.assertions.foo.FooType

        Document doc = DOMUtils.readXml(is);
        Element elem = (Element)doc.getDocumentElement()
            .getElementsByTagNameNS("http://cxf.apache.org/test/assertions/foo", "foo").item(0);
        Assertion a = ab.build(elem);
        JaxbAssertion<FooType> jba = JaxbAssertion.cast(a, FooType.class);
        FooType foo = jba.getData();
        assertEquals("CXF", foo.getName());
        assertEquals(2, foo.getNumber().intValue());        
    }
View Full Code Here

Examples of org.apache.cxf.test.assertions.foo.FooType

        Element elem =  DOMUtils.findAllElementsByTagNameNS(doc.getDocumentElement(),
                                                          "http://cxf.apache.org/test/assertions/foo",
                                                          "foo").get(0);
        Assertion a = ab.build(elem, null);
        JaxbAssertion<FooType> jba = JaxbAssertion.cast(a, FooType.class);
        FooType foo = jba.getData();
        assertEquals("CXF", foo.getName());
        assertEquals(2, foo.getNumber().intValue());        
    }
View Full Code Here

Examples of org.apache.cxf.test.assertions.foo.FooType

        Element elem =  DOMUtils.findAllElementsByTagNameNS((Element)doc.getDocumentElement(),
                                                          "http://cxf.apache.org/test/assertions/foo",
                                                          "foo").get(0);
        Assertion a = ab.build(elem);
        JaxbAssertion<FooType> jba = JaxbAssertion.cast(a, FooType.class);
        FooType foo = jba.getData();
        assertEquals("CXF", foo.getName());
        assertEquals(2, foo.getNumber().intValue());        
    }
View Full Code Here

Examples of org.apache.cxf.test.assertions.foo.FooType

        Document doc = DOMUtils.readXml(is);
        Element elem = (Element)doc.getDocumentElement()
            .getElementsByTagNameNS("http://cxf.apache.org/test/assertions/foo", "foo").item(0);
        PolicyAssertion a = ab.build(elem);
        JaxbAssertion<FooType> jba = JaxbAssertion.cast(a, FooType.class);
        FooType foo = jba.getData();
        assertEquals("CXF", foo.getName());
        assertEquals(2, foo.getNumber().intValue());        
    }
View Full Code Here

Examples of org.apache.cxf.test.assertions.foo.FooType

        JaxbAssertion<FooType> assertion = new JaxbAssertion<FooType>();
        assertNull(assertion.getName());
        assertNull(assertion.getData());
        assertTrue(!assertion.isOptional());
        assertEquals(Constants.TYPE_ASSERTION, assertion.getType());
        FooType data = new FooType();
        data.setName("CXF");
        data.setNumber(2);
        QName qn = new QName("http://cxf.apache.org/test/assertions/foo", "FooType");
        assertion.setName(qn);
        assertion.setData(data);
        assertion.setOptional(true);
        assertSame(qn, assertion.getName());
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.