use of io.seata.saga.proctrl.mock.MockInstruction in project seata by seata.
the class ProcessControllerTests method testSimpleProcessCtrl.
@Test
public void testSimpleProcessCtrl() {
try {
ProcessCtrlEventPublisher processCtrlEventPublisher = buildEventPublisher();
ProcessContext context = new ProcessContextImpl();
MockInstruction instruction = new MockInstruction();
instruction.setTestString("one");
context.setInstruction(instruction);
context.setVariable("TEST", "test");
processCtrlEventPublisher.publish(context);
} catch (Exception e) {
Assertions.fail(e);
}
}
use of io.seata.saga.proctrl.mock.MockInstruction in project seata by seata.
the class ProcessControllerTests method testSimpleProcessCtrlAsync.
@Test
public void testSimpleProcessCtrlAsync() {
try {
ProcessCtrlEventPublisher processCtrlEventPublisher = buildAsyncEventPublisher();
ProcessContext context = new ProcessContextImpl();
MockInstruction instruction = new MockInstruction();
instruction.setTestString("one");
context.setInstruction(instruction);
context.setVariable("TEST", "test");
processCtrlEventPublisher.publish(context);
} catch (Exception e) {
Assertions.fail(e);
}
}
Aggregations