码迷,mamicode.com
首页 > 编程语言 > 详细

Spring下的单元测试

时间:2014-12-03 10:33:01      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:blog   io   ar   sp   java   on   2014   log   bs   

package test.v2;

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.AbstractJUnit4SpringContextTests;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import cn.uihome.service.product.ProductAddressManager;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({ "classpath:beans-*.xml" })
public class SearchAPITest extends AbstractJUnit4SpringContextTests {
	@Autowired
	ProductAddressManager addressManager;
	@Test
	public void testMaxPrice(){
		System.out.println(addressManager.getProductMaxPrice());
	}
}

Spring下的单元测试

标签:blog   io   ar   sp   java   on   2014   log   bs   

原文地址:http://blog.csdn.net/hackcoder/article/details/41693341

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!