@Test public void calculateZeroTest() { Num price = DoubleNum.valueOf(100); Num amount = DoubleNum.valueOf(2); Num cost = borrowingModel.calculate(price, amount); assertNumEquals(DoubleNum.valueOf(0), cost); }
public Num calculate(Num price, Num amount) { return price.numOf(0); }
LinearBorrowingCostModel implements CostModel { public Num calculate(Num price, Num amount) { return price.numOf(0); } }
LinearBorrowingCostModel implements CostModel { public Num calculate(Num price, Num amount) { return price.numOf(0); } LinearBorrowingCostModel(double feePerPeriod); }
LinearBorrowingCostModel implements CostModel { public Num calculate(Num price, Num amount) { return price.numOf(0); } LinearBorrowingCostModel(double feePerPeriod); Num calculate(Num price, Num amount); Num calculate(Trade trade); Num calculate(Trade trade, int currentIndex); boolean equals(CostModel otherModel); }
LinearBorrowingCostModel implements CostModel { public Num calculate(Num price, Num amount) { return price.numOf(0); } LinearBorrowingCostModel(double feePerPeriod); Num calculate(Num price, Num amount); Num calculate(Trade trade); Num calculate(Trade trade, int currentIndex); boolean equals(CostModel otherModel);  }