some code samples, various examples of simple modeling ideas and some minor algorithms.

AccountTest.java 509B

1234567891011121314151617181920212223242526
  1. import org.junit.Assert;
  2. import org.junit.After;
  3. import org.junit.Before;
  4. import org.junit.Test;
  5. public class AccountTest
  6. {
  7. Account account = new Account(100);
  8. @Test
  9. public void accountTest(){
  10. int expected = 100;
  11. int actual = account.balance();
  12. Assert.assertEquals(expected, actual);
  13. }
  14. @Test
  15. public void openTest(){
  16. Account expected = null;
  17. Account actual = account.open(110);
  18. Assert.assertEquals(expected, actual);
  19. }
  20. }