Search in sources :

Example 1 with MyIDResolver

use of org.eclipse.persistence.testing.jaxb.idresolver.MyIDResolver in project eclipselink by eclipse-ee4j.

the class PropertyTestCases method testUnmarshallerIdResolver.

public void testUnmarshallerIdResolver() throws Exception {
    String SUN_ID_RESOLVER = "org.glassfish.jaxb.IDResolver";
    String SUN_JSE_ID_RESOLVER = "com.sun.xml.internal.bind.IDResolver";
    IDResolver resolver = new MyIDResolver();
    u.setProperty(UnmarshallerProperties.ID_RESOLVER, resolver);
    assertEquals(resolver, u.getProperty(UnmarshallerProperties.ID_RESOLVER));
    Object nonELResolver = new NonELIDResolver();
    u.setProperty(SUN_ID_RESOLVER, nonELResolver);
    assertEquals(nonELResolver, u.getProperty(SUN_ID_RESOLVER));
    u.setProperty(SUN_JSE_ID_RESOLVER, nonELResolver);
    assertEquals(nonELResolver, u.getProperty(SUN_JSE_ID_RESOLVER));
    u.setProperty(SUN_JSE_ID_RESOLVER, null);
    assertNull(u.getProperty(SUN_JSE_ID_RESOLVER));
}
Also used : MyIDResolver(org.eclipse.persistence.testing.jaxb.idresolver.MyIDResolver) NonELIDResolver(org.eclipse.persistence.testing.jaxb.sun.idresolver.NonELIDResolver) IDResolver(org.eclipse.persistence.oxm.IDResolver) MyIDResolver(org.eclipse.persistence.testing.jaxb.idresolver.MyIDResolver) NonELIDResolver(org.eclipse.persistence.testing.jaxb.sun.idresolver.NonELIDResolver)

Aggregations

IDResolver (org.eclipse.persistence.oxm.IDResolver)1 MyIDResolver (org.eclipse.persistence.testing.jaxb.idresolver.MyIDResolver)1 NonELIDResolver (org.eclipse.persistence.testing.jaxb.sun.idresolver.NonELIDResolver)1