Beispiel #1
0
 @Test
 public void delete() {
   Account acc = accountDao.getAccountByUsername("admin");
   if (acc != null) {
     accountDao.delete(acc.getAccountId());
   }
 }
Beispiel #2
0
 @Test
 public void insert() {
   Account acc = accountDao.getAccountByUsername("admin");
   if (acc != null) {
     accountDao.delete(acc.getAccountId());
   }
   Account account = new Account();
   account.setUsername("admin");
   account.setPassword("amdin");
   account.setFullName("Grubby");
   accountDao.insert(account);
 }
Beispiel #3
0
 @Test
 public void selectOne() {
   Account account = accountDao.selectByPrimaryKey(1);
   Assert.assertEquals(account.getUsername(), "test01");
   Assert.assertEquals(account.getPassword(), "test01");
 }