Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to do a test on local EJB service

 
Nakataa Kokuyo
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic