I am trying to figure out how to properly write unit tests with Spring roo generaged Entity classes. I understand how to handle the static methods on Entity objects by using the @MockStaticEntityMethods, however, what I don't understand is how to deal with persist(). Since your running in a JUNIT test the injection of the entitymanager does not occur and I don't see away to manually inject the entitymanager with a mock. Can anyone shed any light on to this if I am making any since?
Announcement Announcement Module
No announcement yet.
Spring roo and Unit Testing with Mock Objects Page Title Module
Move Remove Collapse