import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import cn.tisson.zk.portal.service.TestService;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:applicationContext.xml", "classpath:springmvc.xml" })
public class Test1 {
@Autowired
private TestService testService;
@Test
public void test1(){
testService.test();
}
}
springmvc单元测试类
最新推荐文章于 2024-05-17 00:48:59 发布