Skip to Main Content
MOCKITO COOKBOOK
book

MOCKITO COOKBOOK

by Marcin Grzejszczak
June 2014
Intermediate to advanced content levelIntermediate to advanced
284 pages
6h 9m
English
Packt Publishing
Content preview from MOCKITO COOKBOOK

Injecting test doubles instead of beans using Springockito

In this recipe, we will replace an existing bean with a test double using Springockito's annotations. (refer to Springockito core at https://bitbucket.org/kubek2k/springockito/wiki/Home, Springockito annotations at https://bitbucket.org/kubek2k/springockito/wiki/springockito-annotations).

Getting ready

To add Springockito annotations to your classpath, refer to the following dependency configurations. The configuration for Gradle is as follows:

testCompile 'org.kubek2k:springockito-annotations:1.0.9'
and Maven
<dependency>
	<groupId>org.kubek2k</groupId>
	<artifactId>springockito-annotations</artifactId>
	<version>1.0.9</version>
</dependency>            

Our system under test is the person's tax transferring ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mockito Essentials

Mockito Essentials

Sujoy Acharya
Mockito for Spring

Mockito for Spring

Sujoy Acharya
SPRING COOKBOOK

SPRING COOKBOOK

Jerome Jaglale, Murat Yilmaz

Publisher Resources

ISBN: 9781783982745Supplemental Content