use of com.evolveum.midpoint.xml.ns._public.common.common_3.GenericObjectType in project midpoint by Evolveum.
the class TestParseGenericObject method testParseGenericDom.
@Test
public void testParseGenericDom() throws SchemaException, DatatypeConfigurationException {
System.out.println("===[ testParseGenericDom ]===");
// GIVEN
PrismContext prismContext = PrismTestUtil.getPrismContext();
Document document = DOMUtil.parseFile(GENERIC_FILE);
Element resourceElement = DOMUtil.getFirstChildElement(document);
// WHEN
PrismObject<GenericObjectType> generic = prismContext.parserFor(resourceElement).parse();
// THEN
System.out.println("Parsed generic object:");
System.out.println(generic.debugDump());
assertGenericObject(generic);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.GenericObjectType in project midpoint by Evolveum.
the class TestParseGenericObject method testPrismParseJaxbObjectType.
/**
* The definition should be set properly even if the declared type is ObjectType. The Prism should determine
* the actual type.
* @throws DatatypeConfigurationException
*/
@Deprecated
@Test(enabled = false)
public void testPrismParseJaxbObjectType() throws JAXBException, SchemaException, SAXException, IOException, DatatypeConfigurationException {
System.out.println("===[ testPrismParseJaxbObjectType ]===");
// GIVEN
PrismContext prismContext = PrismTestUtil.getPrismContext();
JaxbTestUtil jaxbProcessor = JaxbTestUtil.getInstance();
// WHEN
GenericObjectType genericType = jaxbProcessor.unmarshalObject(GENERIC_FILE, GenericObjectType.class);
// THEN
assertGenericObject(genericType.asPrismObject());
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.GenericObjectType in project midpoint by Evolveum.
the class TestParseGenericObject method testPrismParseJaxb.
@Deprecated
@Test(enabled = false)
public void testPrismParseJaxb() throws JAXBException, SchemaException, SAXException, IOException, DatatypeConfigurationException {
System.out.println("===[ testPrismParseJaxb ]===");
// GIVEN
PrismContext prismContext = PrismTestUtil.getPrismContext();
JaxbTestUtil jaxbProcessor = JaxbTestUtil.getInstance();
// WHEN
GenericObjectType genericType = jaxbProcessor.unmarshalObject(GENERIC_FILE, GenericObjectType.class);
// THEN
assertGenericObject(genericType.asPrismObject());
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.GenericObjectType in project midpoint by Evolveum.
the class TestParseGenericObject method testPrismParseJaxbElementObjectType.
/**
* Parsing in form of JAXBELement, with declared ObjectType
* @throws DatatypeConfigurationException
*/
@Deprecated
@Test(enabled = false)
public void testPrismParseJaxbElementObjectType() throws JAXBException, SchemaException, SAXException, IOException, DatatypeConfigurationException {
System.out.println("===[ testPrismParseJaxbElementObjectType ]===");
// GIVEN
PrismContext prismContext = PrismTestUtil.getPrismContext();
JaxbTestUtil jaxbProcessor = JaxbTestUtil.getInstance();
// WHEN
JAXBElement<GenericObjectType> jaxbElement = jaxbProcessor.unmarshalElement(GENERIC_FILE, GenericObjectType.class);
GenericObjectType genericType = jaxbElement.getValue();
// THEN
assertGenericObject(genericType.asPrismObject());
}
Aggregations