Ejemplo n.º 1
0
 @Test
 public void delete() {
   Account acc = accountDao.getAccountByUsername("admin");
   if (acc != null) {
     accountDao.delete(acc.getAccountId());
   }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
 @Test
 public void selectOne() {
   Account account = accountDao.selectByPrimaryKey(1);
   Assert.assertEquals(account.getUsername(), "test01");
   Assert.assertEquals(account.getPassword(), "test01");
 }