Question: package BankAccountTest; import junit.framework.Assert; import org.junit.Before; import org.junit.Test; class BankAccountTest { public void testDebitWithEnoughBalance() { BankAccount account = new BankAccount(10.0); double amount = account.debit(5.0); Assert.assertEquals(5.0,

package BankAccountTest;

import junit.framework.Assert; import org.junit.Before; import org.junit.Test;

class BankAccountTest {

public void testDebitWithEnoughBalance() { BankAccount account = new BankAccount(10.0); double amount = account.debit(5.0); Assert.assertEquals(5.0, account.getBalance()); }

public void testDebitWithNotEnoughBalance() { BankAccount account = new BankAccount(10.0); double amount = account.debit(15.0); Assert.assertEquals(10.0, account.getBalance()); }

} } }

can you help me with my java code please so it runs efficently the program is essentially made for Bank Account Testing.

Callem

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!