You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Benedikt Ritter <be...@systemoutprintln.de> on 2012/03/02 10:17:59 UTC
[SANDBOX][BeanUtils2] Util class for testing
Hi,
I've started to implement copyPropertiesTo(T target) in
DefaultBeanAccessor. Now I'd like to make some changes to the test
environment.
I've come to the realization, that we often want to change a handful of
TestBean's properties in a row and than do some assertions (for example
if the changed properties have been populated correctly). For better
readability I implemented changeScalarProperties(),
changeArrayProperties(), and assertReadWritePropertiesEquals(TestBean
expected, TestBean actual) in CloneTestCase.
Now I also need those methods on CopyPropertiesToTestCase so I would
like to implement TestBeanUtils as a util class, that provides those
methods.
Regards,
Benedikt
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [SANDBOX][BeanUtils2] Util class for testing
Posted by Simone Tripodi <si...@apache.org>.
Good, sounds reasonable.
-Simo
http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/
On Fri, Mar 2, 2012 at 1:28 PM, Benedikt Ritter
<be...@systemoutprintln.de> wrote:
> Okay,
>
> I'll split that up into two separate patches, to make it easier to review.
> First, I will centralize util testing methods and clean up the other test
> cases (if neccessary), than I will create the patch that implements
> copyPropertiesTo() and the corresponding test case, that uses those util
> methods.
>
> Benedikt
>
> Am 02.03.2012 13:22, schrieb Simone Tripodi:
>
>> Hi Bene,
>>
>> you are free to vent your fantasy in testcases, it helps a lot to
>> analyze corner cases :)
>> I'll be more strict on core design anyway :P
>>
>> -Simo
>>
>> http://people.apache.org/~simonetripodi/
>> http://simonetripodi.livejournal.com/
>> http://twitter.com/simonetripodi
>> http://www.99soft.org/
>>
>>
>>
>> On Fri, Mar 2, 2012 at 10:17 AM, Benedikt Ritter
>> <be...@systemoutprintln.de> wrote:
>>>
>>> Hi,
>>>
>>> I've started to implement copyPropertiesTo(T target) in
>>> DefaultBeanAccessor.
>>> Now I'd like to make some changes to the test environment.
>>>
>>> I've come to the realization, that we often want to change a handful of
>>> TestBean's properties in a row and than do some assertions (for example
>>> if
>>> the changed properties have been populated correctly). For better
>>> readability I implemented changeScalarProperties(),
>>> changeArrayProperties(),
>>> and assertReadWritePropertiesEquals(TestBean expected, TestBean actual)
>>> in
>>> CloneTestCase.
>>> Now I also need those methods on CopyPropertiesToTestCase so I would like
>>> to
>>> implement TestBeanUtils as a util class, that provides those methods.
>>>
>>> Regards,
>>> Benedikt
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [SANDBOX][BeanUtils2] Util class for testing
Posted by Benedikt Ritter <be...@systemoutprintln.de>.
Okay,
I'll split that up into two separate patches, to make it easier to review.
First, I will centralize util testing methods and clean up the other
test cases (if neccessary), than I will create the patch that implements
copyPropertiesTo() and the corresponding test case, that uses those util
methods.
Benedikt
Am 02.03.2012 13:22, schrieb Simone Tripodi:
> Hi Bene,
>
> you are free to vent your fantasy in testcases, it helps a lot to
> analyze corner cases :)
> I'll be more strict on core design anyway :P
>
> -Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
>
>
> On Fri, Mar 2, 2012 at 10:17 AM, Benedikt Ritter
> <be...@systemoutprintln.de> wrote:
>> Hi,
>>
>> I've started to implement copyPropertiesTo(T target) in DefaultBeanAccessor.
>> Now I'd like to make some changes to the test environment.
>>
>> I've come to the realization, that we often want to change a handful of
>> TestBean's properties in a row and than do some assertions (for example if
>> the changed properties have been populated correctly). For better
>> readability I implemented changeScalarProperties(), changeArrayProperties(),
>> and assertReadWritePropertiesEquals(TestBean expected, TestBean actual) in
>> CloneTestCase.
>> Now I also need those methods on CopyPropertiesToTestCase so I would like to
>> implement TestBeanUtils as a util class, that provides those methods.
>>
>> Regards,
>> Benedikt
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [SANDBOX][BeanUtils2] Util class for testing
Posted by Simone Tripodi <si...@apache.org>.
Hi Bene,
you are free to vent your fantasy in testcases, it helps a lot to
analyze corner cases :)
I'll be more strict on core design anyway :P
-Simo
http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/
On Fri, Mar 2, 2012 at 10:17 AM, Benedikt Ritter
<be...@systemoutprintln.de> wrote:
> Hi,
>
> I've started to implement copyPropertiesTo(T target) in DefaultBeanAccessor.
> Now I'd like to make some changes to the test environment.
>
> I've come to the realization, that we often want to change a handful of
> TestBean's properties in a row and than do some assertions (for example if
> the changed properties have been populated correctly). For better
> readability I implemented changeScalarProperties(), changeArrayProperties(),
> and assertReadWritePropertiesEquals(TestBean expected, TestBean actual) in
> CloneTestCase.
> Now I also need those methods on CopyPropertiesToTestCase so I would like to
> implement TestBeanUtils as a util class, that provides those methods.
>
> Regards,
> Benedikt
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org