@Test public void updatesTradeGuardsWithAllMarketData() { cut.newData(someMarketPrice); verify(indicator1).updateMarketData(someMarketPrice); verify(indicator2).updateMarketData(someMarketPrice); cut.newData(someOtherMarketPrice); verify(indicator1).updateMarketData(someOtherMarketPrice); verify(indicator2).updateMarketData(someOtherMarketPrice); }
@Override public void newData(final C candleStick) { receivedData = true; stream(orderFilters).forEach(guard -> guard.updateMarketData(candleStick)); }
OrderFilteringBroker implements Broker<BasicPendingOrder>, MarketDataListener<C> { @Override public void newData(final C candleStick) { receivedData = true; stream(orderFilters).forEach(guard -> guard.updateMarketData(candleStick)); } }
OrderFilteringBroker implements Broker<BasicPendingOrder>, MarketDataListener<C> { @Override public void newData(final C candleStick) { receivedData = true; stream(orderFilters).forEach(guard -> guard.updateMarketData(candleStick)); } @SafeVarargs  OrderFilteringBroker(final Broker<BasicPendingOrder> broker, final OrderFilter<C>... orderFilters); }
OrderFilteringBroker implements Broker<BasicPendingOrder>, MarketDataListener<C> { @Override public void newData(final C candleStick) { receivedData = true; stream(orderFilters).forEach(guard -> guard.updateMarketData(candleStick)); } @SafeVarargs  OrderFilteringBroker(final Broker<BasicPendingOrder> broker, final OrderFilter<C>... orderFilters); @Override OrderManagement sendOrder(final BasicPendingOrder order,
                                     final OrderEventListener eventListener); @Override void newData(final C candleStick); }
OrderFilteringBroker implements Broker<BasicPendingOrder>, MarketDataListener<C> { @Override public void newData(final C candleStick) { receivedData = true; stream(orderFilters).forEach(guard -> guard.updateMarketData(candleStick)); } @SafeVarargs  OrderFilteringBroker(final Broker<BasicPendingOrder> broker, final OrderFilter<C>... orderFilters); @Override OrderManagement sendOrder(final BasicPendingOrder order,
                                     final OrderEventListener eventListener); @Override void newData(final C candleStick);  }