Search in sources :

Example 1 with ACSJMSObjectMessage

use of com.cosylab.acs.jms.ACSJMSObjectMessage in project ACS by ACS-Community.

the class MessageTest method testObjectMessage.

/**
	 * Test the ACSJMSObjectMessage
	 * 
	 * @throws Exception
	 */
public void testObjectMessage() throws Exception {
    ContainerServices cs = getContainerServices();
    assertNotNull("ContainerServices is null!", cs);
    ACSJMSObjectMessage objMsg = new ACSJMSObjectMessage(cs);
    assertNotNull("Error building the ACSJMSObjectMessage", objMsg);
    Integer intVal = new Integer(1099);
    objMsg.setObject(intVal);
    Object obj = objMsg.getObject();
    assertTrue("Wrong class type", obj instanceof Integer);
    assertEquals("The object differs", intVal, (Integer) obj);
}
Also used : ContainerServices(alma.acs.container.ContainerServices) ACSJMSObjectMessage(com.cosylab.acs.jms.ACSJMSObjectMessage)

Aggregations

ContainerServices (alma.acs.container.ContainerServices)1 ACSJMSObjectMessage (com.cosylab.acs.jms.ACSJMSObjectMessage)1