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 passing a dummy datasource?)? The reason I ask is that my test execution time went from 0.03s to 3.75s for this one test. I'd like them to of course run correctly first and then as fast as possible.
Thanks for your help. Michael Horwitz wrote: > > 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 > resource > bundle for the locale in which you are running. > > Mike. > > > -- View this message in context: http://www.nabble.com/Unit-Test-SpringMVC-Controller-tf3282306s2369.html#a9173499 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
