T D D BACK UNDER CONTROL
public class TradeSteps {
TradingServices ts = new TradingServices(...);
Map<String, Stock> stocks = new Map();
public void gicenStock(Sting name, Double threshold) {
stocks.put(name, ts.createStock(name, threshold));
}
public void tradeAt(String name, Double value) {
ts.tradeAt(stocks.get(name), value);
}
public void thenAlert(String name, String status) {
Assert.assertEquals(status, stocks.get(name).getStatus());
}
}