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-
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
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
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
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
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
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
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
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
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
10 matches
Mail list logo