@Test @DisplayName("require active transaction to play events") void requireActiveTx() { assertThrows(IllegalStateException.class, () -> new TxPlayingEntity().play(arbitrary())); }
@Override public BatchDispatchOutcome play(Iterable<Event> events) { checkNotNull(events); BatchDispatch process = new BatchDispatch(transaction); for (Event event : events) { process.play(event); } return process.summary(); }
TransactionalEventPlayer implements EventPlayer { @Override public BatchDispatchOutcome play(Iterable<Event> events) { checkNotNull(events); BatchDispatch process = new BatchDispatch(transaction); for (Event event : events) { process.play(event); } return process.summary(); } }
TransactionalEventPlayer implements EventPlayer { @Override public BatchDispatchOutcome play(Iterable<Event> events) { checkNotNull(events); BatchDispatch process = new BatchDispatch(transaction); for (Event event : events) { process.play(event); } return process.summary(); } TransactionalEventPlayer(EventPlayingTransaction<?, ?, ?, ?> transaction); }
TransactionalEventPlayer implements EventPlayer { @Override public BatchDispatchOutcome play(Iterable<Event> events) { checkNotNull(events); BatchDispatch process = new BatchDispatch(transaction); for (Event event : events) { process.play(event); } return process.summary(); } TransactionalEventPlayer(EventPlayingTransaction<?, ?, ?, ?> transaction); @Override BatchDispatchOutcome play(Iterable<Event> events); }
TransactionalEventPlayer implements EventPlayer { @Override public BatchDispatchOutcome play(Iterable<Event> events) { checkNotNull(events); BatchDispatch process = new BatchDispatch(transaction); for (Event event : events) { process.play(event); } return process.summary(); } TransactionalEventPlayer(EventPlayingTransaction<?, ?, ?, ?> transaction); @Override BatchDispatchOutcome play(Iterable<Event> events);  }