package cn.edu.zjweu.StudentAdmin.Dao;
import cn.edu.zjweu.StudentAdmin.User.User;
import cn.edu.zjweu.StudentAdmin.Util.DbUtil;
import org.junit.Assert;
import org.junit.Test;
import java.sql.Connection;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.test.annotation.Rollback;
import static org.hamcrest.Matchers.is;
public class UserDaoTest {
UserDao userDao = new UserDao();
@Test
@Transactional
@Rollback(true)
public void testDelete() throws Exception {
Connection con=null;
DbUtil dbUtil= new DbUtil();
con=dbUtil.getCon();
boolean result = userDao.delete(con, "32");
Assert.assertEquals(false, result);
}
}