예제 #1
0
 @Test
 public void createAccount() {
   Account created = new Account(null, "first", "last", "test", "testagain", null, Gender.FEMALE);
   accountDao.createAccount(created);
   Account retrieved = accountDao.findAccountById(created.getId());
   Assert.assertEquals(created.getId(), retrieved.getId());
   Assert.assertEquals(created.getFirstName(), retrieved.getFirstName());
   Assert.assertEquals(created.getLastName(), retrieved.getLastName());
   Assert.assertEquals(created.getPassword(), retrieved.getPassword());
 }
예제 #2
0
 @Test
 public void findAccountById() {
   Account a = accountDao.findAccountById(Long.valueOf(100001));
   Assert.assertEquals(a.getId(), Long.valueOf(100001));
   Assert.assertEquals(a.getFirstName(), "Jose");
   Assert.assertEquals(a.getLastName(), "Jose");
   Assert.assertEquals(a.getLogin(), "upswimsdn");
   Assert.assertEquals(a.getPassword(), "aaaaaa");
 }