@Test public void testBuilder() { final BaseGlobalTransactionEvent in = mock(BaseGlobalTransactionEvent.class); final Supplier process = mock(Supplier.class); final BaseTransactionCommand send = mock(BaseTransactionCommand.class); final BaseTransactionEvent blow = mock(BaseTransactionEvent.class); final WorkerMeta meta = mock(WorkerMeta.class); final Consumer attach = mock(Consumer.class); final GlobalTransactionStepDefinition result = GlobalTransactionStepDefinition.builder() .in(in) .process(Optional.of(process)) .send(Stream.of(send)) .blow(Stream.of(blow)) .meta(meta) .attach(attach) .build(); assertEquals(in, result.getIn()); assertEquals(process, result.getProcess().get()); assertTrue(result.getSend().allMatch(s -> s.equals(send))); assertTrue(result.getBlow().allMatch(b -> b.equals(blow))); assertEquals(meta, result.getMeta()); assertEquals(attach, result.getAttach().get()); }
public static <T extends BaseGlobalTransactionEvent> GlobalTransactionPipelineBuilder<T> builder() { return new GlobalTransactionPipelineBuilder<T>(); }
GlobalTransactionStepDefinition extends AbstractTransactionStepDefinition<BaseGlobalTransactionEvent> { public static <T extends BaseGlobalTransactionEvent> GlobalTransactionPipelineBuilder<T> builder() { return new GlobalTransactionPipelineBuilder<T>(); } }
GlobalTransactionStepDefinition extends AbstractTransactionStepDefinition<BaseGlobalTransactionEvent> { public static <T extends BaseGlobalTransactionEvent> GlobalTransactionPipelineBuilder<T> builder() { return new GlobalTransactionPipelineBuilder<T>(); } GlobalTransactionStepDefinition(BaseGlobalTransactionEvent in, Optional<Supplier> process, Stream<BaseTransactionCommand> send, Stream<BaseTransactionEvent> blow, ReceivedCommand receivedCommand, Optional<Consumer<String>> attach, ReceivedCommandGTX receivedCommandGTX, WorkerMeta meta, Stream<BaseTransactionCommand> prepare,CompensateWhen compensateWhen);  GlobalTransactionStepDefinition(); }
GlobalTransactionStepDefinition extends AbstractTransactionStepDefinition<BaseGlobalTransactionEvent> { public static <T extends BaseGlobalTransactionEvent> GlobalTransactionPipelineBuilder<T> builder() { return new GlobalTransactionPipelineBuilder<T>(); } GlobalTransactionStepDefinition(BaseGlobalTransactionEvent in, Optional<Supplier> process, Stream<BaseTransactionCommand> send, Stream<BaseTransactionEvent> blow, ReceivedCommand receivedCommand, Optional<Consumer<String>> attach, ReceivedCommandGTX receivedCommandGTX, WorkerMeta meta, Stream<BaseTransactionCommand> prepare,CompensateWhen compensateWhen);  GlobalTransactionStepDefinition(); static GlobalTransactionPipelineBuilder<T> builder(); void accept(StepGlobalTxVisitor visitor); WorkerMeta getMeta(); Stream<BaseTransactionCommand> getPrepare(); }
GlobalTransactionStepDefinition extends AbstractTransactionStepDefinition<BaseGlobalTransactionEvent> { public static <T extends BaseGlobalTransactionEvent> GlobalTransactionPipelineBuilder<T> builder() { return new GlobalTransactionPipelineBuilder<T>(); } GlobalTransactionStepDefinition(BaseGlobalTransactionEvent in, Optional<Supplier> process, Stream<BaseTransactionCommand> send, Stream<BaseTransactionEvent> blow, ReceivedCommand receivedCommand, Optional<Consumer<String>> attach, ReceivedCommandGTX receivedCommandGTX, WorkerMeta meta, Stream<BaseTransactionCommand> prepare,CompensateWhen compensateWhen);  GlobalTransactionStepDefinition(); static GlobalTransactionPipelineBuilder<T> builder(); void accept(StepGlobalTxVisitor visitor); WorkerMeta getMeta(); Stream<BaseTransactionCommand> getPrepare();  }