<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" > <channel><title>Comments for MacBean Technology</title> <atom:link href="http://macbeantechnology.co.uk/comments/feed/" rel="self" type="application/rss+xml" /><link>http://macbeantechnology.co.uk</link> <description></description> <lastBuildDate>Wed, 12 Jan 2011 10:50:21 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Comment on Automate Testing JavaBeans by Andrew Dunn</title><link>http://macbeantechnology.co.uk/blog/automate-testing-javabeans/comment-page-1/#comment-24</link> <dc:creator>Andrew Dunn</dc:creator> <pubDate>Wed, 12 Jan 2011 10:50:21 +0000</pubDate> <guid isPermaLink="false">http://macbeantechnology.co.uk/?p=425#comment-24</guid> <description>Great job, I have on the odd occasion thought about doing something similar. I will disagree slightly with you about the need to test JavaBeans, these should always be tested. Not for the getters and setters explicitly but for the hashcode and equals methods. JavaBeans should always override these methods and these methods are easy to add using eclipse (it&#039;s just a right click to generate it).When I say a great start I think that this should be taken further. A couple of enhancements would be to change it so that the hashcode and equals are always tested by default. Secondly it would be really good to test scenarios where hashcode and equals should not be equal, i.e. change the value of each property on one of the beans one at a time and check that the hashcode and equals are different (remembering to change the value back after the test). I have seen many examples where a new property is added onto the bean and the hashcode or equals (if it is actually overridden) has not been updated.But like I said, great job.</description> <content:encoded><![CDATA[<p>Great job, I have on the odd occasion thought about doing something similar. I will disagree slightly with you about the need to test JavaBeans, these should always be tested. Not for the getters and setters explicitly but for the hashcode and equals methods. JavaBeans should always override these methods and these methods are easy to add using eclipse (it&#8217;s just a right click to generate it).</p><p>When I say a great start I think that this should be taken further. A couple of enhancements would be to change it so that the hashcode and equals are always tested by default. Secondly it would be really good to test scenarios where hashcode and equals should not be equal, i.e. change the value of each property on one of the beans one at a time and check that the hashcode and equals are different (remembering to change the value back after the test). I have seen many examples where a new property is added onto the bean and the hashcode or equals (if it is actually overridden) has not been updated.</p><p>But like I said, great job.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching using disk: basic
Object Caching 201/201 objects using disk: basic

Served from: macbeantechnology.co.uk @ 2012-02-22 22:16:27 -->
