No tests found matching

在这里插入图片描述

	void test() {
		User user=new User();
		user.setAccount("zhangsan");
		user.setPwd("123456");
		
		try {
			User dbUser =ub.login(user);
			Assert.notNull(dbUser, "dbUser不能为空");
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		user.setPwd("654321");
		try {
			User dbUser =ub.login(user);
			Assert.isNull(dbUser, "dbUser不能为空");
			
		} catch (Exception e) {
			e.printStackTrace();
			Assert.hasText(e.getMessage(),"用户名或密码错误");
		}
void test=>public void test    就可以了  

猜你喜欢

转载自blog.csdn.net/weixin_45942124/article/details/108693354