on-internet
← Community

InitializationError in a JUnit Test Case

Stack Overflow ·

I use eclipse and I have written the following code: package JUnitTestPackage; import static org.junit.Assert.*; import org.junit.Ignore; import org.junit.Test; import JUnit_Test.BankAccount; public class BankAccountTest { @Test public void testDeposit() { BankAccount account = new BankAccount(); account.deposit(1000); account.deposit(100); assertTrue("Test Deposit", 1100 == account.getBalance()); } @Test @Ignore public void testWithdraw() { fail("Not yet implemented"); } @Test @Ignore public void testGetBalance() { fail("Not yet implemented"); } } So, I work with Eclipse and JUnit for the fir

Comments

Sign in or sign up to comment and upvote.

No comments yet.