登陆的测试类。
package com.wh.test;
import org.junit.Test;
import com.wh.entity.Student;
import com.wh.service.LoginService;
import com.wh.service.LoginServiceImpl;
public class TestLoginService {
@Test
public void testLogin() {
LoginService loginService=new LoginServiceImpl();
Student student=new Student("无厘头大师","234");
Boolean bool=loginService.login(student);
System.out.println(bool);
}
}
注册的测试类。
package com.wh.test;
import org.junit.Test;
import com.wh.entity.Student;
import com.wh.service.RegisterServie;
import com.wh.service.RegisterServieIml;
import com.wh.utils.DateUtil;
public class TestRegisterService {
@SuppressWarnings("rawtypes")
/**
* 测试登陆功能是否实现
*/
@Test
public void testRegister() {
System.out.println("我是测试输出");
RegisterServie rs = new RegisterServieIml();
Student student = new Student(6, "你老婆真", "232", "朱小涛", "男", 23, "黄冈", DateUtil.dateParse("2018-1-1", "yyyy-MM-dd"));
Enum status = rs.register(student);
System.out.println(status);
}
}