File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Testing and the fly likes How to do a test on local EJB service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "How to do a test on local EJB service" Watch "How to do a test on local EJB service" New topic
Author

How to do a test on local EJB service

Nakataa Kokuyo
Ranch Hand

Joined: Jul 24, 2011
Posts: 186
Good day,

I'm seeking for the advice of how we can test the local EJB service which hosted in jBOSS by Junit from eclipse IDE?

Thanks
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
You can use mocking libraries like mockito to mock out the injection or (better) use arquillian to test the unit in an embeddable container.
Nakataa Kokuyo
Ranch Hand

Joined: Jul 24, 2011
Posts: 186
Hi E Armitage,

for the case of mockito, is it using injectMocks? is it required Contecx Lookup in start up?

http://docs.mockito.googlecode.com/hg/latest/org/mockito/InjectMocks.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to do a test on local EJB service