package cn.junit;
import static org.junit.Assert.*;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import cn.itcast.bean.Person;
import cn.itcast.service.PersonService;
public class PersonServiceTest {
private static PersonService personService;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
try {System.out.println("5555");
ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
System.out.println("5555");
personService =(PersonService) context.getBean("personService");
System.out.println("5555");
} catch (RuntimeException e) {
e.printStackTrace();
}
}
@Test
public void testSave() {
personService.save(new Person("小叶"));
}
@Test
public void testUpdate() {
fail("Not yet implemented");
}
@Test
public void testDelete() {
fail("Not yet implemented");
}
@Test
public void testGetPerson() {
fail("Not yet implemented");
}
@Test
public void testGetPersons() {
fail("Not yet implemented");
}
}