Package org.codehaus.activemq.test

Examples of org.codehaus.activemq.test.XidStub


        assertTrue("Should have returned an XATransactionCommend: " + value, value instanceof XATransactionCommand);
    }

    public void testXidSerialization() throws Exception {
        XidStub xidStub = new XidStub(new byte[]{1, 2, 3, 4, 5});
        ActiveMQXid xid = new ActiveMQXid(xidStub);

        byte[] data = serialize(xid);
        Object value = deserialize(data);
View Full Code Here


        assertEquals("deserialized object is not equal", xid, value);
    }

    public void testXidEquals() throws Exception {
        XidStub xidStub = new XidStub(new byte[]{1, 2, 3, 4, 5});
        ActiveMQXid xid1 = new ActiveMQXid(xidStub);
        ActiveMQXid xid2 = new ActiveMQXid(xidStub);

        assertEquals("object hashes are not equal", xid1.hashCode(), xid2.hashCode());
        assertEquals("objects are not equal", xid1, xid2);
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.test.XidStub

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.