| 12345678910111213141516171819202122232425262728293031 |
- package com.zipcodewilmington.bankaccountlab;
-
- import org.junit.Assert;
- import org.junit.Before;
- import org.junit.Test;
-
- import static org.junit.Assert.assertEquals;
-
- public class AtmTest {
- ATM atm;
-
- @Before
- public void setup() {
- atm = new ATM();
- atm.add(new CheckingAccount(2000));
- atm.add(new SavingsAccount(1500));
- atm.add(new BusinessAccount(3000));
- }
-
- @Test
- public void getTotal() {
- //Expect
- double expected = 6500;
-
- //Actual
- double actual = atm.getTotal();
-
- Assert.assertEquals(expected, actual, 0.1);
- }
-
- }
|