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());
}
Aggregations