jUnit 4.0 test entitymanager = null
Hello.
I'm beginning to learn about EJB 3.0.
I've started to write a small (rather "small") program in ejb 3.0, and everything is ok, but I'm trying to add some junit test to it, and I have this problem:
I've created test case for my class CalendarManager (session bean to do something with my entities) - with three methods - addEvent, removeEvent, and updateEvent;
when I'm trying to run the test from eclipse method calnderadManager.addEvent(e) throws nullpointer exception.
The thing is that inside there is an entitymanager which is offcourse null.
Now it's null beacause test isn't running on jboss - i know that.
Is there any solution to this? How can I run a simple test case of my sesion bean from eclipse being connected to jboss context at the time?