<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-1959052963816936322.post231573975146652504..comments</id><updated>2008-11-06T14:16:06.114-08:00</updated><category term='C#'/><category term='Java'/><category term='Asp.Net'/><category term='Aspx'/><category term='Reporters'/><title type='text'>Comments on Approval Tests: Approve is the new Assert</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.approvaltests.com/feeds/231573975146652504/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1959052963816936322/231573975146652504/comments/default'/><link rel='alternate' type='text/html' href='http://blog.approvaltests.com/2008/10/approve-is-new-assert.html'/><author><name>Llewellyn Falco</name><uri>http://www.blogger.com/profile/11668997629228826023</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_s2oZS5jFv1g/SPTCNxT1pyI/AAAAAAAAABI/bW8VaJ-Hlwk/S220/Llew.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1959052963816936322.post-9094989376581381097</id><published>2008-11-06T14:16:00.000-08:00</published><updated>2008-11-06T14:16:00.000-08:00</updated><title type='text'>Maybe i didn't get the point, but...&lt;br&gt;&lt;br&gt;1) If ...</title><content type='html'>Maybe i didn't get the point, but...&lt;BR/&gt;&lt;BR/&gt;1) If you want to see details about your object, you can use the debugger. In good RAD tools, the IDE lets you see the state of each attribute just using things like "Object Inspector".&lt;BR/&gt;&lt;BR/&gt;2) If you want to replace a lot of asserts, put them in a separated method that does exactly this. But if you want to check if a object is valid (check its state), add it a method "IsValid":&lt;BR/&gt;game.Add( 5 );&lt;BR/&gt;game.Add( 4 );&lt;BR/&gt;game.Add( 7 );&lt;BR/&gt;game.Add( 2 );&lt;BR/&gt;AssertTrue( game.IsValid() );&lt;BR/&gt;&lt;BR/&gt;You can still create a "IValidateMySelf" interface so that your objects can inherit from it to make this job generic:&lt;BR/&gt;&lt;BR/&gt;ApproveMe(IValidateMySelf obj)&lt;BR/&gt;{&lt;BR/&gt;  AssertTrue( obj.IsValid() );&lt;BR/&gt;}&lt;BR/&gt;&lt;BR/&gt;So...&lt;BR/&gt;&lt;BR/&gt;game.Add( 5 );&lt;BR/&gt;game.Add( 4 );&lt;BR/&gt;game.Add( 7 );&lt;BR/&gt;game.Add( 2 );&lt;BR/&gt;ApproveMe( game );&lt;BR/&gt;&lt;BR/&gt;Isn't easier ?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1959052963816936322/231573975146652504/comments/default/9094989376581381097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1959052963816936322/231573975146652504/comments/default/9094989376581381097'/><link rel='alternate' type='text/html' href='http://blog.approvaltests.com/2008/10/approve-is-new-assert.html?showComment=1226009760000#c9094989376581381097' title=''/><author><name>Thiago Delgado Pinto</name><uri>http://www.blogger.com/profile/00791998615484436526</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.approvaltests.com/2008/10/approve-is-new-assert.html' ref='tag:blogger.com,1999:blog-1959052963816936322.post-231573975146652504' source='http://www.blogger.com/feeds/1959052963816936322/posts/default/231573975146652504' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-928151259'/></entry></feed>
