Re: [appfuse-user] BaseDaoTestCase populate method

2007-07-17 Thread fadhli
Hi Matt, I replaced the BeanUtils.copyProperties(map, obj) in BaseDaoTestCase to org.apache.commons.beanutils.BeanUtils.copyProperties(obj, map) and the populate from properties files works like a charm. Insight gathered from this thread http://www.nabble.com/NullPointerException-when-trying-to-

Re: [appfuse-user] BaseDaoTestCase populate method

2007-07-16 Thread fadhli
No, it's in the same directory as in the test class I created. Upon further debugging the BaseDaoTestCase, I found out that the BeansUtil is not copying the map object into the target object and I have no idea why. I haven't use BeansUtil before so I'm not sure what's wrong. On 7/17/07, Matt

Re: [appfuse-user] BaseDaoTestCase populate method

2007-07-16 Thread Matt Raible
Is your properties file in src/test/resources? On 7/16/07, fadhli <[EMAIL PROTECTED]> wrote: Hi everyone, I have a problem where the test *.properties file is not being copied to the test-class target folder. I really appreciate if someone has done testing using the populate method from the Ba

[appfuse-user] BaseDaoTestCase populate method

2007-07-16 Thread fadhli
Hi everyone, I have a problem where the test *.properties file is not being copied to the test-class target folder. I really appreciate if someone has done testing using the populate method from the BaseDaoTestCase and how you got it to work. FYI, I'm using Appfuse 2.0-m5 but only the core packa

Re: [appfuse-user] BaseDAOTestCase populate method

2007-03-08 Thread Matt Raible
Yes, you should be able to use dot-notation to accomplish this. For Dates, you might have to register the DateConverter (from service.util) so dates use your preferred formatting. Matt On 3/8/07, Philip Barlow <[EMAIL PROTECTED]> wrote: Yeah i checked that stuff, case is fine and setters are p

Re: [appfuse-user] BaseDAOTestCase populate method

2007-03-08 Thread Philip Barlow
Yeah i checked that stuff, case is fine and setters are public. Never mind i'm sure i'll figure it out. On this subject, is it possible to populate dates using this method and what about objects that have other objects as properties? Can they be populated using the .properties file too? Example O

Re: [appfuse-user] BaseDAOTestCase populate method

2007-03-08 Thread Matt Raible
No, it's not a requirement, I imagine your properties file is using the wrong case for the properties - or something like that. Are you setters public? Matt On 3/8/07, Philip Barlow <[EMAIL PROTECTED]> wrote: I have not implemented toString() on the object i am testing, i take it this is a req

Re: [appfuse-user] BaseDAOTestCase populate method

2007-03-08 Thread Philip Barlow
I have not implemented toString() on the object i am testing, i take it this is a requirement for BeanUtils.copyProperties()? If so should it be implemented using ToStringBuilder as in Appfuse 2.x? Matt Raible wrote: If you execute toString() on your object, is it really populated? If you have

Re: [appfuse-user] BaseDAOTestCase populate method

2007-03-07 Thread Matt Raible
If you execute toString() on your object, is it really populated? If you have a setup method, is it calling super.setup()? Matt On 3/7/07, Philip Barlow <[EMAIL PROTECTED]> wrote: Hi guys, Are there any known issues with populating your model objects using the populate method in BaseDaoTestCa

[appfuse-user] BaseDAOTestCase populate method

2007-03-07 Thread Philip Barlow
Hi guys, Are there any known issues with populating your model objects using the populate method in BaseDaoTestCase class. I have set up a .properties file with the same name as my test case and entered values for each property of the model object, yet when BeanUtils.copyProperties is called the