Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mockito for Spring
  • Table Of Contents Toc
  • Feedback & Rating feedback
Mockito for Spring

Mockito for Spring

By : Acharya
3 (2)
close
close
Mockito for Spring

Mockito for Spring

3 (2)
By: Acharya

Overview of this book

If you are an application developer with some experience in software testing and want to learn more about testing frameworks, then this technology and book is for you. Mockito for Spring will be perfect as your next step towards becoming a competent software tester with Spring and Mockito.
Table of Contents (7 chapters)
close
close

Exploring Mockito

We need to download the Mockito binary to start working with Mockito. You can download the Mockito jar from http://mockito.org/.

As of December 2014, the latest Mockito version is v2.0.2-beta.

The following section configures Eclipse projects to use Mockito.

Configuring Mockito

To add Mockito JAR files as a project dependency, perform the following steps:

  1. Unzip the Mockito JAR files into a folder.
  2. Open Eclipse.
  3. In Eclipse, create a Java project named MockitoOverview.
  4. Right-click on the project. A pop-up menu will appear. Expand the Build Path menu and click on the Configure Build Path menu item. It will open a wizard. Go to the Libraries tab in the Java build path.
  5. Click on the Add External JARs... button and browse to the Mockito folder.
  6. Select all JAR files and click on OK.

Mocking in action

This section provides examples of mock objects with a stock quote simulation program. The program observes the market trend and performs the following actions:

  • Buying new stocks
  • Selling existing...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mockito for Spring
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon