File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Spring In Action Code question related to dependancy injection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring In Action Code question related to dependancy injection" Watch "Spring In Action Code question related to dependancy injection" New topic
Author

Spring In Action Code question related to dependancy injection

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055



I am having confusion reading the above code the very first doubt is for the line

Is this a predefined or user defined.

In the below code Quest is stated as an Interface, but from where does mock comes from and what is mock(Quest.class) implies?


http://www.lifesbizzare.blogspot.com || OCJP:81%
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7

Well first of all when posting code please use proper indentation. There should also be a space between static and org i.e.



If you are asing what is a static import? Then that question would be better suited for the Beginning Java Forum.

Basically it allows you to say



instead of


What do you mean user defined or predefined?

If you are asking if Mockito is something written for the book it is not. It is a testing framework see here:

http://code.google.com/p/mockito/



[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring In Action Code question related to dependancy injection