History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: APF-848
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Matt Raible
Reporter: Ealden Escañan
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
AppFuse

BaseManagerTestCase does not load applicationContext.xml

Created: 20/Aug/07 05:21 AM   Updated: 11/Sep/07 12:42 PM
Component/s: Service Layer
Affects Version/s: 2.0-M5
Fix Version/s: 2.0-RC1


 Description  « Hide
Tried to make a service layer test using BaseManagerTestCase as I did not want to mock my DAO. Couldn't use BaseManagerMockTestCase since it doesn't expose applicationContext (to use getBean()) nor does it autowire via setters. When I run my test, Spring complains that it can't find the manager I defined in applicationContext.xml as BaseManagerTestCase doesn't load said XML file.

 All   Comments   Change History   FishEye      Sort Order:

- 11/Sep/07 12:32 PM
This issue still exists for org.appfuse.service.impl.BaseManagerMockTestCase. Ealden mentioned this class in the original description, but the issue title mentions BaseManagerTestCase instead.

Can we get this into 2.0 (if it's deemed a valid change) ?



Ealden Escañan - 11/Sep/07 12:42 PM
BaseManagerMockTestCase is OK with me. No need to expose applicationContext to it as we're going to provide it's dependencies (that are mocks). BaseManagerTestCase needs applicationContext tho since, I understand it, you'll need to use that if you want your service test to actually retrieve data from the DB via a DAO.