123456789101112131415161718192021222324252627282930313233343536 |
-
-
- import static org.junit.Assert.*;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
-
- public class AccountTest
- {
-
- Account account;
-
- @Before
- public void setUp()
- {
- account = new Account();
- }
-
- @Test
- public void depositTest()
- {
- account = new Account(1000);
- account.deposit(100);
- int expected = 1100;
- int actual = account.balance();
- assertEquals(expected, actual);
- }
-
- @Test
- public void balanceTest() {
- account = new Account(1000);
- int expected = 1000;
- int actual = account.balance();
- assertEquals(expected, actual);
- }
- }
|