1 package org.codehaus.xfire.aegis.type;
2
3 import java.util.Collection;
4 import org.codehaus.xfire.SOAPConstants;
5 import org.codehaus.xfire.aegis.mapping.TypeRegistry;
6 import org.codehaus.xfire.plexus.PlexusXFireTest;
7 import org.dom4j.QName;
8
9 /***
10 * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
11 */
12 public class DefaultTypeRegistryTest
13 extends PlexusXFireTest
14 {
15 public void testRegistry() throws Exception
16 {
17 TypeRegistry tr = (TypeRegistry) lookup( TypeRegistry.ROLE );
18
19 QName q = QName.get("bean", SOAPConstants.SOAP12_ENVELOPE_NS);
20 assertNotNull( tr.getTypeClass(q) );
21
22 tr.unregisterType(q);
23 assertNull( tr.getTypeClass(q) );
24
25 Collection types = tr.getAllTypes();
26 assertNotNull( types );
27 }
28 }