CalculPrice { public static final double applyDiscount(double price, double discount) { return round(price * (1 - discount)); }  static final double getGenericPrice(double price, double discount, double taxe, int binaryMask); static final double removeTaxe(double price, double tax); static final double getDiscountCost(double price, double discount); static final double applyDiscount(double price, double discount); static final double mergeDiscount(double productDiscount, double ticketDiscount); static double applyTax(double price, double taxRate); static double getTaxCost(double price, double taxRate); static double round(double number); static double round(double number, int decimalNumber); static final int DEFAULT_DECIMAL_NUMBER; }
@Test public void applyDiscount() { final double control = 36d; final double a_price = 50; final double discount = 0.28; assertEquals(control, CalculPrice.applyDiscount(a_price, discount)); }