How many tests could you write for the enum class below. I am looking for the following O/P.
given the following command
java fileName HORIZON_BOX, HORIZON_BOX_WITH_CC,HORIZON_BOX_WITH_CC
1 HORIZON_BOX: 20.00
2 HORIZON_BOX_WITH_CC @ 30.00 : 60.00
GRAND TOTAL : 80.00
What is the best solution approach that you would go about solving this problem?
public enum Product {
HORIZON_BOX(30.00),
HORIZON_BOX_WITH_CC(50.00),
HORIZON_BOX_WITH_CC_2_TB(100.00),
HORIZON_MULTIROOM(75.00),
HUB(20.00);
private double price;
private Product(double price) {
this.price = price;
}
public double getPrice() {
return price;
}
}