package com.itheima.day01.junit.test;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import com.itheima.day01.beans.User;
public class UserTest {
private User user;
@Before
public void init(){
//this.user=new User();
}
@Test
public void testLogin(){
Assert.assertNotNull("tfy对象是null",this.user);
System.out.println("对象不为空!!");
this.user.login();
}
@Test
public void testregister(){
this.user.register();
}
@After
public void release(){
this.user=null;
}
}
|
|