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

12345678910111213141516171819202122232425262728293031323334
  1. import static org.junit.Assert.*;
  2. import org.junit.After;
  3. import org.junit.Before;
  4. import org.junit.Test;
  5. /**
  6. * The test class AccountTest.
  7. *
  8. * @author (your name)
  9. * @version (a version number or a date)
  10. */
  11. public class AccountTest
  12. {
  13. Account account;
  14. @Before
  15. public void setUp(){
  16. account = new Account();
  17. }
  18. @Test
  19. public void depositTest(){
  20. account.deposit(10);
  21. int expected = 10;
  22. int actual = account.balance();
  23. assertEquals(expected, actual);
  24. }
  25. }