Search in sources :

Example 1 with DisconnectedFactHandle

use of org.drools.core.common.DisconnectedFactHandle in project drools by kiegroup.

the class CommandSerializationTest method updateCommandTest.

// TESTS ----------------------------------------------------------------------------------------------------------------------
@Test
public void updateCommandTest() throws Exception {
    DisconnectedFactHandle discFactHandle = new DisconnectedFactHandle(2, 3, 4, 5l, "entry-point-id", "str-obj", true);
    DisconnectedFactHandle copyDiscFactHandle = roundTrip(discFactHandle);
    verifyDisconnectedFactHandle(discFactHandle, copyDiscFactHandle);
    UpdateCommand cmd = new UpdateCommand(discFactHandle, "new-str-object");
    UpdateCommand copyCmd = roundTrip(cmd);
    verifyDisconnectedFactHandle(discFactHandle, copyCmd.getHandle());
    assertEquals("entry point", cmd.getEntryPoint(), copyCmd.getEntryPoint());
    assertEquals("object", cmd.getObject(), copyCmd.getObject());
}
Also used : DisconnectedFactHandle(org.drools.core.common.DisconnectedFactHandle) Test(org.junit.Test)

Aggregations

DisconnectedFactHandle (org.drools.core.common.DisconnectedFactHandle)1 Test (org.junit.Test)1