@Test public void traderEventsAreDistributedToAllTraders() { cut.tradeCompleted(someTrade); verify(trader1).tradeCompleted(someTrade); verify(trader2).tradeCompleted(someTrade); verifyNoMoreInteractions(trader1, trader2, admin1, admin2, dev1, dev2); }
@Override public void tradeCompleted(final CompletedTrade trade) { for (final TraderNotifier trader : traders) { trader.tradeCompleted(trade); } }
CombiningNotifier implements CombinedNotifier { @Override public void tradeCompleted(final CompletedTrade trade) { for (final TraderNotifier trader : traders) { trader.tradeCompleted(trade); } } }
CombiningNotifier implements CombinedNotifier { @Override public void tradeCompleted(final CompletedTrade trade) { for (final TraderNotifier trader : traders) { trader.tradeCompleted(trade); } } CombiningNotifier(final Iterable<TraderNotifier> traders,
            final Iterable<AdmininstratorNotifier> administators, final Iterable<DeveloperNotifier> developers); }
CombiningNotifier implements CombinedNotifier { @Override public void tradeCompleted(final CompletedTrade trade) { for (final TraderNotifier trader : traders) { trader.tradeCompleted(trade); } } CombiningNotifier(final Iterable<TraderNotifier> traders,
            final Iterable<AdmininstratorNotifier> administators, final Iterable<DeveloperNotifier> developers); @Override void tradeCompleted(final CompletedTrade trade); @Override void unrecoverableError(final String message, final Throwable cause); @Override void unexpectedEvent(final String message, final Throwable cause); @Override void unexpectedEvent(final String message); @Override void informalEvent(final String message); @Override void unrecoverableProgrammingError(final String message, final Throwable error); }
CombiningNotifier implements CombinedNotifier { @Override public void tradeCompleted(final CompletedTrade trade) { for (final TraderNotifier trader : traders) { trader.tradeCompleted(trade); } } CombiningNotifier(final Iterable<TraderNotifier> traders,
            final Iterable<AdmininstratorNotifier> administators, final Iterable<DeveloperNotifier> developers); @Override void tradeCompleted(final CompletedTrade trade); @Override void unrecoverableError(final String message, final Throwable cause); @Override void unexpectedEvent(final String message, final Throwable cause); @Override void unexpectedEvent(final String message); @Override void informalEvent(final String message); @Override void unrecoverableProgrammingError(final String message, final Throwable error);  }