use of org.eclipse.persistence.internal.xr.Operation in project eclipselink by eclipse-ee4j.
the class ObjectTableTypeTestSuite method getPersonTypeTable.
@Test
public void getPersonTypeTable() {
Invocation invocation = new Invocation("GetPersonTypeTable");
Operation op = xrService.getOperation(invocation.getName());
Object result = op.invoke(xrService, invocation);
assertNotNull("result is null", result);
Document doc = xmlPlatform.createDocument();
XMLMarshaller marshaller = xrService.getXMLContext().createMarshaller();
marshaller.marshal(result, doc);
Document controlDoc = xmlParser.parse(new StringReader(RESULT_XML));
assertTrue("Expected:\n" + documentToString(controlDoc) + "\nActual:\n" + documentToString(doc), comparer.isNodeEqual(controlDoc, doc));
}
use of org.eclipse.persistence.internal.xr.Operation in project eclipselink by eclipse-ee4j.
the class ObjectTableTypeTestSuite method getPersonTypeTable2.
@Test
public void getPersonTypeTable2() {
Invocation invocation = new Invocation("GetPersonTypeTable2");
Operation op = xrService.getOperation(invocation.getName());
Object result = op.invoke(xrService, invocation);
assertNotNull("result is null", result);
Document doc = xmlPlatform.createDocument();
XMLMarshaller marshaller = xrService.getXMLContext().createMarshaller();
marshaller.marshal(result, doc);
Document controlDoc = xmlParser.parse(new StringReader(RESULT_XML));
assertTrue("Expected:\n" + documentToString(controlDoc) + "\nActual:\n" + documentToString(doc), comparer.isNodeEqual(controlDoc, doc));
}
use of org.eclipse.persistence.internal.xr.Operation in project eclipselink by eclipse-ee4j.
the class ObjectTableTypeTestSuite method createGroupTypeTest.
@Test
public void createGroupTypeTest() {
Invocation invocation = new Invocation("CreateGroupType");
invocation.setParameter("GNAME", "MyNewGroup");
Operation op = xrService.getOperation(invocation.getName());
Object result = op.invoke(xrService, invocation);
assertNotNull("result is null", result);
Document doc = xmlPlatform.createDocument();
XMLMarshaller marshaller = xrService.getXMLContext().createMarshaller();
marshaller.marshal(result, doc);
Document controlDoc = xmlParser.parse(new StringReader(NEW_ETABLE_OUTPUT2_XML));
assertTrue("Expected:\n" + documentToString(controlDoc) + "\nActual:\n" + documentToString(doc), comparer.isNodeEqual(controlDoc, doc));
}
use of org.eclipse.persistence.internal.xr.Operation in project eclipselink by eclipse-ee4j.
the class ObjectTableTypeTestSuite method getJobsTest.
@Test
public void getJobsTest() {
Invocation invocation = new Invocation("GetJobsTest");
Operation op = xrService.getOperation(invocation.getName());
Object result = op.invoke(xrService, invocation);
assertNotNull("result is null", result);
Document doc = xmlPlatform.createDocument();
XMLMarshaller marshaller = xrService.getXMLContext().createMarshaller();
marshaller.marshal(result, doc);
Document controlDoc = xmlParser.parse(new StringReader(COLJOBS_XML));
assertTrue("Expected:\n" + documentToString(controlDoc) + "\nActual:\n" + documentToString(doc), comparer.isNodeEqual(controlDoc, doc));
}
use of org.eclipse.persistence.internal.xr.Operation in project eclipselink by eclipse-ee4j.
the class ObjectTableTypeTestSuite method getJobTest.
@Test
public void getJobTest() {
Invocation invocation = new Invocation("GetJobTest");
invocation.setParameter("p_job_id", "3");
Operation op = xrService.getOperation(invocation.getName());
Object result = op.invoke(xrService, invocation);
assertNotNull("result is null", result);
Document doc = xmlPlatform.createDocument();
XMLMarshaller marshaller = xrService.getXMLContext().createMarshaller();
marshaller.marshal(result, doc);
Document controlDoc = xmlParser.parse(new StringReader(TJOBS_XML));
assertTrue("Expected:\n" + documentToString(controlDoc) + "\nActual:\n" + documentToString(doc), comparer.isNodeEqual(controlDoc, doc));
}
Aggregations