最后的结果设置为true,测试没有通过,改为false才能通过,这是什么原因?
package service.impl;
import junit.framework.Assert;
import org.junit.Test;
import service.UsersDAO;
import entity.Users;
public class TestUsersDAOImpl {
@Test
public void testUsersLogin()
{
Users u = new Users(1,"zhangsan","123456");
UsersDAO udao = new UsersDAOImpl();
Assert.assertEquals(false,udao.userLogin(u));
//上面的本应是true,但是测试没有通过,改成false才能通过,这是什么原因?
}
}
//错误显示为:junit.framework.AssertionFailedError: expected:<true> but was:<false>
