| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
-
-
- import static org.junit.Assert.*;
- import org.junit.After;
- import org.junit.Before;
- import org.junit.Test;
-
- /**
- * The test class AccountTest.
- *
- * @author (your name)
- * @version (a version number or a date)
- */
- public class AccountTest
- {
- /**
- * Default constructor for test class AccountTest
- */
- public AccountTest()
- {
- }
-
- /**
- * Sets up the test fixture.
- *
- * Called before every test case method.
- */
- @Before
- public void setUp()
- {
- }
-
- /**
- * Tears down the test fixture.
- *
- * Called after every test case method.
- */
- @After
- public void tearDown()
- {
- }
-
- @Test
- public void accountSum()
- {
- Account account1 = new Account(0);
- assertEquals(null, account1.open(5));
- }
-
- @Test
- public void deposit()
- {
- Account account1 = new Account();
- account1.deposit(5);
- }
-
- @Test
- public void balance()
- {
- Account account2 = new Account();
- assertEquals(10, account2.balance());
- }
-
- @Test
- public void transfer()
- {
- Account account1 = new Account();
- account1.deposit(10);
- assertEquals(true, account1.transfer(account1, 5));
- }
- }
-
-
-
-
|