测试层,判断部分代码是否正确

package com.wh.test;

import org.junit.Test;

import com.wh.entity.User;
import com.wh.servie.LoginService;
import com.wh.servie.LoginServiceImpl;

public class TestLoginService {
@Test
public void testLogin() {
	LoginService loginService=new LoginServiceImpl();
	User user=new User("wang","1234", null, null, 0, null, null);
	Boolean bool=loginService.login(user);
	System.out.println(bool);
}
}

package com.wh.test;

import java.util.Date;

import org.junit.Test;

import com.wh.entity.User;
import com.wh.servie.RegisterServie;
import com.wh.servie.RegisterServieIml;

public class TestRegisterService {
@SuppressWarnings("rawtypes")
@Test
public void testRegister() {
	System.out.println("我是测试输出");
	RegisterServie rs = new RegisterServieIml();
	User user = new User( "aa", "adfd", "sf", "男", 23, "武汉", new Date());
	Enum status = rs.register(user);
	System.out.println(status);
}
}

猜你喜欢

转载自blog.csdn.net/qq_36109477/article/details/85111147