Solved

Jmock

Posted on 2013-12-19
1
199 Views
Last Modified: 2013-12-25
Hello,

I have a question.................

Is it Jmock is used on the select statement of database, not on other  statement with the database such as insert, update or delete operation...

Thanks
0
Comment
Question by:roy_sanu
1 Comment
 
LVL 35

Accepted Solution

by:
mccarl earned 500 total points
ID: 39730772
JMock has no relationship to database query types at all. JMock is used to "mock out" any collaborators of a class under test, ie. if you are testing a "service layer" class they will generally use some sort of DAO class to do their work, so JMock is used to replace the real DAO class with a mock. This mock is then used to ensure that the service class calls the DAO/mock in the correct way, with the correct parameters and also it is used to return required test data back to the service class so it can operate under the conditions of the test.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now