- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathATMTest.java
More file actions
Latest commit
32 lines (24 loc) · 552 Bytes
/
Copy pathATMTest.java
File metadata and controls
32 lines (24 loc) · 552 Bytes
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
importstaticorg.junit.Assert.*;
importorg.junit.Test;
publicclassATMTest {
@Test
publicvoidtest1() {
assertEquals(ATM.performWithdrawal(30, 120), 89.5, .001);
}
@Test
publicvoidtest2() {
assertEquals(ATM.performWithdrawal(42, 120), 120, .001);
}
@Test
publicvoidtest3() {
assertEquals(ATM.performWithdrawal(0, 120), 120, .001);
}
@Test
publicvoidtest4() {
assertEquals(ATM.performWithdrawal(200, 200), 200, .001);
}
@Test
publicvoidtest5() {
assertEquals(ATM.performWithdrawal(50, 10), 10, .001);
}
}