This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
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: 184
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: 184
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