Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Spring and the fly likes Simple question about spring-mock Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Simple question about spring-mock" Watch "Simple question about spring-mock" New topic

Simple question about spring-mock

Nicolas Conde

Joined: Feb 24, 2011
Posts: 3

Good afternoon, wanted to know if spring-mock can be used to generate backend test and pojos, because in all the examples I found are web applications ,servlets, etc.
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Maybe because the Spring-mock library is for mocking out Web stuff.

But for the middle tier stuff just use regular Mocks and Stubs. You can use EasyMock for mocking, and stubbing is just you implementing fake interface implementations to stand in for the dependencies.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Nicolas Conde

Joined: Feb 24, 2011
Posts: 3

Thanks Mark, so, I was right. I use Mockito for backend . thanks again.

I agree. Here's the link:
subject: Simple question about spring-mock
It's not a secret anymore!