import static org.junit.Assert.*;
import org.junit.*;

public class BankAccountTest {

    @Test
    public void testUserStoryOne() {
        BankAccount harrysAccount = new BankAccount(10.0);
        double actualBalance = harrysAccount.getBalance();
        double expectedBalance = 10
        assertEquals(expectedBalance, actualBalance, 0.01);
        
        harrysAccount.deposit(20);
        actualBalance = harrysAccount.getBalance();
        expectedBalance = 30;
        assertEquals(expectedBalance, actualBalance, 0.01);
    }

    @Test
    public void testUserStoryTwo() {
        BankAccount harrysAccount = new BankAccount(10.0);
        harrysAccount.withdraw(3);
        double actualBalance = harrysAccount.getBalance();
        double expectedBalance = 7;
        assertEquals(expectedBalance, actualBalance, 0.01);
    }
    @Test
    public void testUserStoryThree() {
        BankAccount harrysAccount = new BankAccount(10.0);
        harrysAccount.withdraw(11);
        double actualBalance = harrysAccount.getBalance();
        double expectedBalance = 10;
        assertEquals(expectedBalance, actualBalance, 0.01);
    }

    @Test
    public void testUserStoryFour() {
        BankAccount harrysAccount = new BankAccount(10.0);
        harrysAccount.withdraw(-3);
        double actualBalance = harrysAccount.getBalance();
        double expectedBalance = 10;
        assertEquals(expectedBalance, actualBalance, 0.01);
        
        harrysAccount.deposit(-1000);
        actualBalance = harrysAccount.getBalance();
        expectedBalance = 10;
        assertEquals(expectedBalance, actualBalance, 0.01);
    }

}