Examples of CustomTypeMapping


Examples of org.apache.cxf.aegis.type.CustomTypeMapping

    }

    @SuppressWarnings("unchecked")
    @Test
    public void testMapDTO() {
        tm = new CustomTypeMapping();
        creator = new Java5TypeCreator();
        creator.setConfiguration(new Configuration());
        tm.setTypeCreator(creator);

        Type dto = creator.createType(MapDTO.class);
View Full Code Here

Examples of org.apache.cxf.aegis.type.CustomTypeMapping

    @Before
    public void setUp() throws Exception {
        super.setUp();

        tm = new CustomTypeMapping();
        creator = new Java5TypeCreator();
        creator.setNextCreator(new DefaultTypeCreator());
        creator.setConfiguration(new Configuration());
        tm.setTypeCreator(creator);
    }
View Full Code Here

Examples of org.apache.cxf.aegis.type.CustomTypeMapping

    @Before
    public void setUp() throws Exception {
        super.setUp();

        tm = new CustomTypeMapping();
        Java5TypeCreator creator = new Java5TypeCreator();
        creator.setConfiguration(new Configuration());
        tm.setTypeCreator(creator);
    }
View Full Code Here

Examples of org.apache.cxf.aegis.type.CustomTypeMapping

    @Before
    public void setUp() throws Exception {
        super.setUp();

        tm = new CustomTypeMapping();
        creator = new Java5TypeCreator();
        creator.setConfiguration(new Configuration());
        tm.setTypeCreator(creator);
    }
View Full Code Here

Examples of org.apache.cxf.aegis.type.CustomTypeMapping

        assertTrue(type.getTypeClass().isAssignableFrom(String.class));
    }

    @Test
    public void testCollectionDTO() {
        tm = new CustomTypeMapping();
        creator = new Java5TypeCreator();
        creator.setConfiguration(new Configuration());
        tm.setTypeCreator(creator);

        Type dto = creator.createType(CollectionDTO.class);
View Full Code Here

Examples of org.apache.cxf.aegis.type.CustomTypeMapping

        assertEquals(String.class, comType.getTypeClass());
    }

    @Test
    public void testObjectDTO() {
        tm = new CustomTypeMapping();
        creator = new Java5TypeCreator();
        creator.setConfiguration(new Configuration());
        tm.setTypeCreator(creator);

        Type dto = creator.createType(ObjectDTO.class);
View Full Code Here

Examples of org.apache.cxf.aegis.type.CustomTypeMapping

    @Before
    public void setUp() throws Exception {
        super.setUp();

        tm = new CustomTypeMapping();
        Java5TypeCreator creator = new Java5TypeCreator();
        creator.setConfiguration(new Configuration());
        tm.setTypeCreator(creator);
    }
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.CustomTypeMapping

public class CustomTypeMappingTest
    extends TestCase
{
    public void testTM() throws Exception
    {
        CustomTypeMapping mapping = new CustomTypeMapping();
       
        QName qname = new QName( "urn:soap", "String" );
       
        mapping.register( String.class, qname, new StringType() );
       
        assertTrue( mapping.isRegistered( String.class ) );
        assertTrue( mapping.isRegistered( qname ) );
       
        Type type = mapping.getType( String.class );
        assertNotNull( type );
        assertNotNull( mapping.getType( qname ) );

        CustomTypeMapping child = new CustomTypeMapping( mapping );
       
        assertTrue( child.isRegistered( String.class ) );
        assertTrue( child.isRegistered( qname ) );

        assertNotNull( child.getType( String.class ) );
       
        child.removeType(type);
        assertFalse( mapping.isRegistered( String.class ) );
        assertFalse( mapping.isRegistered( qname ) );
    }
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.CustomTypeMapping

        super.setUp();
       
        DefaultTypeMappingRegistry registry = new DefaultTypeMappingRegistry(true);
        TypeMapping defaultTM = registry.getDefaultTypeMapping();
       
        tm = new CustomTypeMapping(defaultTM);
        creator = new XMLTypeCreator();
        creator.setConfiguration(new Configuration());
        DefaultTypeCreator next = new DefaultTypeCreator();
        next.setConfiguration(new Configuration());
        creator.setNextCreator(next);
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.CustomTypeMapping

    public void testSimpleXMLMapping() throws Exception
    {
        XMLTypeCreator creator = new XMLTypeCreator();
        creator.setNextCreator(new DefaultTypeCreator());
        creator.setConfiguration(new Configuration());
        tm = new CustomTypeMapping(new DefaultTypeMappingRegistry().createDefaultMappings());
        creator.setTypeMapping(tm);
        Type type = creator.createType(MyService1.class.getDeclaredMethod("getCollection", new Class[0]), -1);
        assertTrue("type is not a collection", type instanceof CollectionType);
        assertEquals("unexpected collection type", Double.class, ((CollectionType)type).getComponentType().getTypeClass());
        try
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.