勍的空间

life is like a chocolate box. you never know what your gonna get

spring and Mockito

	private final ApplicationContext context = new AnnotationConfigApplicationContext(
			Dsb2bserviceServiceConfiguration.class);

	@InjectMocks
	private Dsb2bserviceController controller;
	

	@Spy  //@Mock
	DsBusinessService dsBusinessService = context.getBean(DsBusinessService.class);

	@Before
	public void setUp() throws Exception {
		controller = context.getBean(Dsb2bserviceController.class);
		MockitoAnnotations.initMocks(this);
	}




阅读更多
想对作者说点什么? 我来说一句

Mockito for spring

2016年04月12日 1.6MB 下载

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭