@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()); }
@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"); }