package java.com.emr;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;


@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath:config/applicationContext.xml"})
public class MapperTest {
	
	@Autowired
	PaperDao paperDao;

	/**
	 * 测试mapper
	 */
	@Test
	public void testCRUD(){
		//1、创建SpringIOC容器
        ApplicationContext ioc=new FileSystemXmlApplicationContext("classpath:config/applicationContext.xml");
		PaperDao paper=ioc.getBean(PaperDao.class);
		//System.out.println(paper);
        //System.out.println(123);
	}
}
