It should be possible to solve this, here's two ways that come to mind:
1. Set the MessageAccessor in a unit test so the lookup doesn't fail.
2. Add logic to BaseControllerTestCase so it's friendlier to mock tests.
Here's a snippet of how I did #1 in Spring Live:
public class UserFormControlle
Hi,
I've changed my test class to extend BaseControllerTestCase instead of
MockObjectTestCase and my test now passes! My question now is that I'm
connecting to the database even though I don't need to; is there an approach
that could be taken to bypass connecting to the database(Maybe by somehow
Hi,
You may want to extend BaseControllerTestCase rather than MockObjectTestCase
as the BaseFormController requires a Spring application context to be
present when it initialises. The piece of code that is failing is when the
BaseFormController tries to obtain the default date format from the res
I'm using AppFuse 2.0 M3 with SpringMVC and was trying to write a unit test
for my controller. When I run my test I get the following error:
java.lang.IllegalStateException: ApplicationObjectSupport instance
[EMAIL PROTECTED] does not run in an
ApplicationContext
at
org.springframework.c