assertEquals(user.get(0).getLoginName(), "maurice");
}
@Test
public void testFindUnique() {
User user = new User();
user = userDao.findUniqueByCriterion(new Criterion[]{
Restrictions.eq("loginName", "maurice"),
Restrictions.eq("state", 1)
});
assertEquals(user.getId(), "SJDK3849CKMS3849DJCK2039ZMSK0001");
user = userDao.findUniqueByProperty("loginName", "maurice");
assertEquals(user.getId(), "SJDK3849CKMS3849DJCK2039ZMSK0001");
user = userDao.findUniqueByProperty("realName", "Mot", RestrictionNames.LIKE);
assertEquals(user.getId(), "SJDK3849CKMS3849DJCK2039ZMSK0003");
}