use of alma.demo.XmlOffshootJ in project ACS by ACS-Community.
the class XmlComponentClientTest method testOffshootJ.
public void testOffshootJ() throws Exception {
XmlOffshoot shoot = xmlComponent.getOffshoot();
assertNotNull(shoot);
XmlOffshootJ shootJ = getContainerServices().getTransparentXmlWrapper(XmlOffshootJ.class, shoot, XmlOffshootOperations.class);
assertNotNull(shootJ);
assertNotNull(shootJ.getObsProposal());
assertNotNull(shootJ.getSchedBlock());
// these values are hardcoded in the m_offshoot implementation
ObsProposal obsProposal = shootJ.getObsProposal();
assertEquals("rtobar", obsProposal.getPI());
assertEquals("2010.0045.34S", obsProposal.getCode());
assertEquals("just for fun", obsProposal.getScientificJustification());
SchedBlock sb = shootJ.getSchedBlock();
assertEquals("holography", sb.getName());
assertEquals("DONE", sb.getStatus());
assertEquals(true, sb.getStandardMode());
// deactivate the m_offshoot on the server-side
xmlComponent.deactivateOffshoot();
try {
shootJ.getObsProposal();
fail("m_offshoot should be deactivated, I shouldn't be able to use it");
} catch (org.omg.CORBA.OBJECT_NOT_EXIST e) {
}
}
use of alma.demo.XmlOffshootJ in project ACS by ACS-Community.
the class ComponentWithXmlOffshootClientTest method testOffshootJ.
public void testOffshootJ() throws Exception {
XmlOffshoot shoot = componentWithXmlOffshoot.getOffshoot();
assertNotNull(shoot);
XmlOffshootJ shootJ = getContainerServices().getTransparentXmlWrapper(XmlOffshootJ.class, shoot, XmlOffshootOperations.class);
assertNotNull(shootJ);
assertNotNull(shootJ.getObsProposal());
assertNotNull(shootJ.getSchedBlock());
// these values are hardcoded in the m_offshoot implementation
ObsProposal obsProposal = shootJ.getObsProposal();
assertEquals("rtobar", obsProposal.getPI());
assertEquals("2010.0045.34S", obsProposal.getCode());
assertEquals("just for fun", obsProposal.getScientificJustification());
SchedBlock sb = shootJ.getSchedBlock();
assertEquals("holography", sb.getName());
assertEquals("DONE", sb.getStatus());
assertEquals(true, sb.getStandardMode());
// deactivate the m_offshoot on the server-side
componentWithXmlOffshoot.deactivateOffshoot();
try {
shootJ.getObsProposal();
fail("m_offshoot should be deactivated, I shouldn't be able to use it");
} catch (org.omg.CORBA.OBJECT_NOT_EXIST e) {
}
}
Aggregations