@Test public void calculateSingleOrderCost() { Num price = DoubleNum.valueOf(100); Num amount = DoubleNum.valueOf(2); Num cost = transactionModel.calculate(price, amount); assertNumEquals(DoubleNum.valueOf(2), cost); }
public Num calculate(Trade trade, int currentIndex) { return this.calculate(trade); }
LinearTransactionCostModel implements CostModel { public Num calculate(Trade trade, int currentIndex) { return this.calculate(trade); } }
LinearTransactionCostModel implements CostModel { public Num calculate(Trade trade, int currentIndex) { return this.calculate(trade); } LinearTransactionCostModel(double feePerTrade); }
LinearTransactionCostModel implements CostModel { public Num calculate(Trade trade, int currentIndex) { return this.calculate(trade); } LinearTransactionCostModel(double feePerTrade); Num calculate(Trade trade, int currentIndex); Num calculate(Trade trade); Num calculate(Num price, Num amount); boolean equals(CostModel otherModel); }
LinearTransactionCostModel implements CostModel { public Num calculate(Trade trade, int currentIndex) { return this.calculate(trade); } LinearTransactionCostModel(double feePerTrade); Num calculate(Trade trade, int currentIndex); Num calculate(Trade trade); Num calculate(Num price, Num amount); boolean equals(CostModel otherModel);  }