assertTrue(custom instanceof MyStringType);
}
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
{
creator.createType(MyService1.class.getDeclaredMethod("getUnmapped", new Class[]{java.util.List.class}), 0);
fail("Unmapped collection did not throw an exception");
}
catch(XFireRuntimeException ex)
{
}