CreateManager |
|
Your trail: |
Difference between
version 16
and
version 15:
At line 245 added 8 lines. |
Finally, we need to create the PersonManagerTest.properties file in test/web/**/service so that {{personForm = (PersonForm) populate(personForm);}} will work in our test. |
|
;:''Duplicating (and renaming) the PersonDaoTest.properties is the easy route. Alternatively, you could set the properties manually. Make sure and add an __id__ property.'' |
{{{ |
id=1 |
firstName=Matt |
lastName=Raible |
}}} |
At line 254 added 12 lines. |
|
Save all your edited files and try running "ant test-web -Dtestcase=PersonManager" one more time. |
|
__Yeah Baby, Yeah:__ |
%%(color:green)BUILD SUCCESSFUL\\ |
Total time: 13 seconds%% |
|
;:''You'll notice a nice long StackTrace for an ObjectNotFound error - caused by the last part of the "testAddAndRemovePerson" method in PersonManagerTest. You can remove it by removing the e.printStackTrace() in BaseDaoHibernate.retrieveObject(Session ses, Class clazz, Long id).'' |
|
---- |
|
''Next Up:'' __Part II:__ [Creating new Managers|CreateManager] - A HowTo for creating [Business Delegates|http://java.sun.com/blueprints/corej2eepatterns/Patterns/BusinessDelegate.html] that talk to the database tier (DAOs) and the web tier (Struts Actions). |
Back to CreateManager,
or to the Page History.
|