-
Notifications
You must be signed in to change notification settings - Fork 377
/
EBBillTest.java
47 lines (36 loc) · 1.15 KB
/
EBBillTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class EBBillTest {
//Write JUNIT Test Code
EBBill bill = null;
@Test
public void testCalculateBillAmount_Input_0() {
bill = new EBBill(0);
assertEquals(0, bill.calculateBillAmount(), 0.001);
}
@Test
public void testCalculateBillAmount_Input_50() {
bill = new EBBill(50);
assertEquals(130, bill.calculateBillAmount(), 0.001);
}
@Test
public void testCalculateBillAmount_Input_100() {
bill = new EBBill(100);
assertEquals(292.5, bill.calculateBillAmount(), 0.001);
}
@Test
public void testCalculateBillAmount_Input_200() {
bill = new EBBill(200);
assertEquals(818.5, bill.calculateBillAmount(), 0.001);
}
@Test
public void testCalculateBillAmount_Input_1000() {
bill = new EBBill(1000);
assertEquals(7018.5, bill.calculateBillAmount(), 0.001);
}
@Test
public void testCalculateBillAmount_Input_5000() {
bill = new EBBill(5000);
assertEquals(47018.5, bill.calculateBillAmount(), 0.001);
}
}