@Test public void distributesCandleSticksToTheExpertAdvisorsInTheOrderPassedInTheConstructor() { cut.newData(candle1); cut.newData(candle2); final InOrder inOrder = inOrder(input1, input2); inOrder.verify(input1).newData(candle1); inOrder.verify(input2).newData(candle1); inOrder.verify(input1).newData(candle2); inOrder.verify(input2).newData(candle2); inOrder.verifyNoMoreInteractions(); }
@Override public void newData(final C candleStick) { advisors.forEach(advisor -> advisor.newData(candleStick)); }
MarketDataDistributor implements ExpertAdvisor<C> { @Override public void newData(final C candleStick) { advisors.forEach(advisor -> advisor.newData(candleStick)); } }
MarketDataDistributor implements ExpertAdvisor<C> { @Override public void newData(final C candleStick) { advisors.forEach(advisor -> advisor.newData(candleStick)); } MarketDataDistributor(final Iterable<MarketDataListener<C>> advisors); @SafeVarargs  MarketDataDistributor(final MarketDataListener<C>... advisors); }
MarketDataDistributor implements ExpertAdvisor<C> { @Override public void newData(final C candleStick) { advisors.forEach(advisor -> advisor.newData(candleStick)); } MarketDataDistributor(final Iterable<MarketDataListener<C>> advisors); @SafeVarargs  MarketDataDistributor(final MarketDataListener<C>... advisors); @Override void newData(final C candleStick); }
MarketDataDistributor implements ExpertAdvisor<C> { @Override public void newData(final C candleStick) { advisors.forEach(advisor -> advisor.newData(candleStick)); } MarketDataDistributor(final Iterable<MarketDataListener<C>> advisors); @SafeVarargs  MarketDataDistributor(final MarketDataListener<C>... advisors); @Override void newData(final C candleStick);  }