<?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-1973750947775262558.post1164878444527806335..comments</id><updated>2009-11-11T04:56:09.462-05:00</updated><category term='coldfusion'/><category term='BOF'/><category term='server configuration'/><category term='debugging'/><category term='jenkins'/><category term='SQL Server'/><category term='jira'/><category term='CFUnited'/><category term='Windows'/><category term='Security'/><category term='twicf'/><category term='timesavers'/><category term='MongoDB'/><category term='MAX'/><category term='user group'/><category term='TDD'/><category term='bcrypt'/><category term='BDD'/><category term='start'/><category term='CFUG'/><category term='RIAUnleashed'/><category term='ORM'/><category term='eclipse plugin'/><category term='Under  the Hood'/><category term='MXUnit Videos'/><category term='shortcuts'/><category term='Code Dojo'/><category term='OO Design'/><category term='cfeclipse dictionaries'/><category term='Hudson'/><category term='Humor'/><category term='eclipse'/><category term='Documentation'/><category term='closures'/><category term='announcements'/><category term='facebook'/><category term='launchy'/><category term='mxunit product update'/><category term='Continuous Integration'/><category term='cfml'/><category term='scala'/><category term='ant'/><category term='air'/><category term='java'/><category term='refactoring'/><category term='mylyn'/><category term='mxunit eclipse plugin'/><category term='webservices'/><category term='energy saving tips'/><category term='unit testing testing private methods'/><category term='Presentations'/><category term='Best Practices'/><category term='flex'/><category term='test automation'/><category term='LiveCycle'/><category term='android'/><category term='Learning'/><category term='cfant'/><category term='noise control'/><category term='mobile development'/><category term='drivers'/><category term='flash builder'/><category term='generics'/><category term='twitter'/><category term='cfeclipse'/><category term='testability'/><category term='coldfusion builder'/><category term='unit testing'/><category term='ria'/><category term='fun'/><category term='cfObjective'/><category term='blogging'/><category term='svfug'/><category term='conferences'/><category term='subversion'/><title type='text'>Comments on MXUnit Blog: A Fluent Paradigm For Refactoring Conditional Logi...</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.mxunit.org/feeds/1164878444527806335/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html'/><author><name>bill shelton</name><uri>http://www.blogger.com/profile/06624894387927690246</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='32' height='32' src='http://2.bp.blogspot.com/_R-2JPB8crqk/TIdxkrbeOnI/AAAAAAAAAZw/hHv2ocuuyqA/S220/avatar-twitter-white-bg.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1973750947775262558.post-4589454020357388710</id><published>2009-11-11T04:56:09.462-05:00</published><updated>2009-11-11T04:56:09.462-05:00</updated><title type='text'>Formulate the arguments symbolically and test its ...</title><content type='html'>Formulate the arguments symbolically and test its validity using the truth table. Also mention critical row (or rows).&lt;br /&gt;&lt;br /&gt;   If I study hard or I get rich, then I get A’s.&lt;br /&gt;   I get A’s.&lt;br /&gt; If I don’t study hard, then I get rich.&lt;br /&gt;&lt;br /&gt;Where p = I study hard, &lt;br /&gt;           q = I get A’s,   &lt;br /&gt;            r = I get rich.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/4589454020357388710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/4589454020357388710'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html?showComment=1257933369462#c4589454020357388710' title=''/><author><name>aryan baryan</name><uri>http://www.blogger.com/profile/06157347878764842083</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.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html' ref='tag:blogger.com,1999:blog-1973750947775262558.post-1164878444527806335' source='http://www.blogger.com/feeds/1973750947775262558/posts/default/1164878444527806335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1333421153'/></entry><entry><id>tag:blogger.com,1999:blog-1973750947775262558.post-7251569039714906470</id><published>2009-01-23T14:44:00.000-05:00</published><updated>2009-01-23T14:44:00.000-05:00</updated><title type='text'>@manfred, doh! my bad. the print() method is a hac...</title><content type='html'>@manfred, doh! my bad. the print() method is a hack i threw into the framework - i'm always adding stuff i think should be in coldfusion anyway. i'll send up another zip file with the correction. just replace that with debug() and you'll be good to go. thanks for point it out!&lt;BR/&gt;&lt;BR/&gt;bill</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/7251569039714906470'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/7251569039714906470'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html?showComment=1232739840000#c7251569039714906470' title=''/><author><name>billy</name><uri>http://www.blogger.com/profile/06624894387927690246</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17359140296736057249'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_R-2JPB8crqk/SUEE7sNuL1I/AAAAAAAAAGU/-bo1g6-m8fk/S220/che3.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html' ref='tag:blogger.com,1999:blog-1973750947775262558.post-1164878444527806335' source='http://www.blogger.com/feeds/1973750947775262558/posts/default/1164878444527806335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1094271333'/></entry><entry><id>tag:blogger.com,1999:blog-1973750947775262558.post-1275705700346751236</id><published>2009-01-23T12:10:00.000-05:00</published><updated>2009-01-23T12:10:00.000-05:00</updated><title type='text'>Billy, thanks for the quick response. Yes, that wa...</title><content type='html'>Billy, thanks for the quick response. Yes, that was the problem. I was trying to figure out what your code was trying to create on line 88, as I have never tried/seen that syntax. &lt;BR/&gt;FYI, I am running CFMX v8,0,0,176276   Enterprise. I will try it on  CFMX v8.01 server to see what happens.&lt;BR/&gt;&lt;BR/&gt;All of the tests in /validator/ValidatorTest.cfc?testMethod pass except resetGoodieShouldClearExceptionArray(). It indicates the variable PRINT is undefined (line 5 of ValidatorTest.cfc). Is that a function that you use? Or is that in MXunit? I was just trying to figure out today if I have the latest version of MXUnit.&lt;BR/&gt;&lt;BR/&gt;Thanks,&lt;BR/&gt;Manfred</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/1275705700346751236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/1275705700346751236'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html?showComment=1232730600000#c1275705700346751236' title=''/><author><name>Manfred</name><uri>http://www.blogger.com/profile/14540084036917318716</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.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html' ref='tag:blogger.com,1999:blog-1973750947775262558.post-1164878444527806335' source='http://www.blogger.com/feeds/1973750947775262558/posts/default/1164878444527806335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1631412972'/></entry><entry><id>tag:blogger.com,1999:blog-1973750947775262558.post-6945554312731295030</id><published>2009-01-23T11:21:00.000-05:00</published><updated>2009-01-23T11:21:00.000-05:00</updated><title type='text'>@manfred,  thanks! It looks like, for some reason,...</title><content type='html'>@manfred,  thanks! It looks like, for some reason, your CF install does not like my implicit struct notation.  I just re-downloaded it myself and ran it ok on my windows xp machine (CF8.1 multi-server).  To make the tests pass, you might want to change line 88: args = {...};  to something like:&lt;BR/&gt;args = structNew();&lt;BR/&gt;args.foo = 'bar';&lt;BR/&gt;args.mydate = now();&lt;BR/&gt;a = arrayNew(1);&lt;BR/&gt;a[1] = 123;&lt;BR/&gt;args.theArray = a;&lt;BR/&gt;...&lt;BR/&gt;or some such. The args data is pretty much arbitrary, but it's used to test complex data.&lt;BR/&gt;&lt;BR/&gt;Try that and see if that works.&lt;BR/&gt;&lt;BR/&gt;best,&lt;BR/&gt;bill</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/6945554312731295030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/6945554312731295030'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html?showComment=1232727660000#c6945554312731295030' title=''/><author><name>billy</name><uri>http://www.blogger.com/profile/06624894387927690246</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17359140296736057249'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_R-2JPB8crqk/SUEE7sNuL1I/AAAAAAAAAGU/-bo1g6-m8fk/S220/che3.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html' ref='tag:blogger.com,1999:blog-1973750947775262558.post-1164878444527806335' source='http://www.blogger.com/feeds/1973750947775262558/posts/default/1164878444527806335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1094271333'/></entry><entry><id>tag:blogger.com,1999:blog-1973750947775262558.post-3107177160807609832</id><published>2009-01-23T11:02:00.000-05:00</published><updated>2009-01-23T11:02:00.000-05:00</updated><title type='text'>This is great. Thanks. I downloaded the .zip file ...</title><content type='html'>This is great. Thanks. I downloaded the .zip file and placed it in my wwwroot, but I am getting a CFML compiler. I am running CFMX v8 and MXUnit. When I run http://localhost//validator/ValidatorTest.cfc?method=runTestRemote&lt;BR/&gt;I get this error:&lt;BR/&gt;&lt;BR/&gt;The CFML compiler was processing:&lt;BR/&gt;&lt;BR/&gt;    * A script statement beginning with args on line 88, column 4.&lt;BR/&gt;    * A script statement beginning with function on line 86, column 3.&lt;BR/&gt;    * A cfscript tag beginning on line 2, column 2.&lt;BR/&gt;&lt;BR/&gt; &lt;BR/&gt;The error occurred in D:\WebSites\validator\ValidatorTest.cfc: line 88&lt;BR/&gt;&lt;BR/&gt;86 :   function setUp(){&lt;BR/&gt;87 :    validator = createObject("component","validator.Validator");&lt;BR/&gt;88 :    args = {args = [1,2,'asd',now(),{foo=['bar',-123.09932,[123,'00']]}]};&lt;BR/&gt;89 :   }&lt;BR/&gt;90 :</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/3107177160807609832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/3107177160807609832'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html?showComment=1232726520000#c3107177160807609832' title=''/><author><name>Manfred</name><uri>http://www.blogger.com/profile/14540084036917318716</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.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html' ref='tag:blogger.com,1999:blog-1973750947775262558.post-1164878444527806335' source='http://www.blogger.com/feeds/1973750947775262558/posts/default/1164878444527806335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1631412972'/></entry><entry><id>tag:blogger.com,1999:blog-1973750947775262558.post-8529112361572678583</id><published>2009-01-22T05:24:00.000-05:00</published><updated>2009-01-22T05:24:00.000-05:00</updated><title type='text'>@marc, re:dataprovider, I wasn't thinking too much...</title><content type='html'>@marc, re:dataprovider, I wasn't thinking too much about generating inputs, but I think you got the picture. Imagine a test signature like this:&lt;BR/&gt;&lt;BR/&gt;[cffunction name="testThatLoopsOverAQuery" dataprovider="someQuery"]&lt;BR/&gt; [cfargument name="rowName1"]&lt;BR/&gt; [cfargument name="rowName2"]&lt;BR/&gt; assert (rowName1 gt rowName2, 'or whatever - #someQuery.currentRow#');&lt;BR/&gt;[/cffunction]&lt;BR/&gt;&lt;BR/&gt;Note parameters. This test would be executed for each row of the query. We should also be able to pass in arrays and structs.&lt;BR/&gt;&lt;BR/&gt;re:covering the truth table - I didn't think about the connection between the dataprovider and truth table coverage until you brought it up. I think I like that idea :-). Note to self: As per @marc esher, see how we can leverage a dataprovider annotation and automatic truth table generation.&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;bill</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/8529112361572678583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/8529112361572678583'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html?showComment=1232619840000#c8529112361572678583' title=''/><author><name>billy</name><uri>http://www.blogger.com/profile/06624894387927690246</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17359140296736057249'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_R-2JPB8crqk/SUEE7sNuL1I/AAAAAAAAAGU/-bo1g6-m8fk/S220/che3.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html' ref='tag:blogger.com,1999:blog-1973750947775262558.post-1164878444527806335' source='http://www.blogger.com/feeds/1973750947775262558/posts/default/1164878444527806335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1094271333'/></entry><entry><id>tag:blogger.com,1999:blog-1973750947775262558.post-6734933696803141236</id><published>2009-01-22T04:41:00.000-05:00</published><updated>2009-01-22T04:41:00.000-05:00</updated><title type='text'>bill, are you talking about auto-generating inputs...</title><content type='html'>bill, are you talking about auto-generating inputs for a dataprovider annotation? or just providing the dataprovider annotation and the mechanism for running it:&lt;BR/&gt;&lt;BR/&gt;[cffunction name=myFunctionSHouldDoThis mxunit:dataprovider=someFunctionNameThatReturnsAQuery mxunit:failfast=false]&lt;BR/&gt;&lt;BR/&gt;it sounds like you're talking about generating meaningful inputs... that seems awfully sketchy to me. but then, i'm no big thinker.&lt;BR/&gt;&lt;BR/&gt;i've only read the docs on testng's dataprovider, but from what i've read, i'm thinking mxunit will be able to go even further with the concept, largely because you can so easily do dynamic invocations. you could have pre and post functions to run before and after each row of the dataprovider is executed, and then a post-dataprovider function that acted on the results of the full loop. this owuld just be gravy if you needed it; otherwise, with no functions being passed in, mxunit would simply loop over the test function itself once for each row in the dataprovider, execute the test, and behave accordingly based on the failfast attribute.&lt;BR/&gt;&lt;BR/&gt;great stuff here. i am looking forward to the day where test writing becomes more about thinking about inputs and less thinking about boilerplate junk</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/6734933696803141236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/6734933696803141236'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html?showComment=1232617260000#c6734933696803141236' title=''/><author><name>Marc Esher</name><uri>http://www.blogger.com/profile/05942611191966201181</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.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html' ref='tag:blogger.com,1999:blog-1973750947775262558.post-1164878444527806335' source='http://www.blogger.com/feeds/1973750947775262558/posts/default/1164878444527806335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-260340863'/></entry><entry><id>tag:blogger.com,1999:blog-1973750947775262558.post-7733123514040351252</id><published>2009-01-21T04:46:00.000-05:00</published><updated>2009-01-21T04:46:00.000-05:00</updated><title type='text'>@marc, thinking again about covering the truth tab...</title><content type='html'>@marc, thinking again about covering the truth table ... there should be a recursive algorithm that, given a set of values intended for boolean expressions, traverses or visits each combination. I suspect that we could generate a minimal structure of valid and invalid values and then visit each combination. I'll bang this out after cup #2 ;-), and after the adobe articles, and after the AOP widget, and after this that and the other ...</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/7733123514040351252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/7733123514040351252'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html?showComment=1232531160000#c7733123514040351252' title=''/><author><name>billy</name><uri>http://www.blogger.com/profile/06624894387927690246</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17359140296736057249'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_R-2JPB8crqk/SUEE7sNuL1I/AAAAAAAAAGU/-bo1g6-m8fk/S220/che3.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html' ref='tag:blogger.com,1999:blog-1973750947775262558.post-1164878444527806335' source='http://www.blogger.com/feeds/1973750947775262558/posts/default/1164878444527806335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1094271333'/></entry><entry><id>tag:blogger.com,1999:blog-1973750947775262558.post-458130604009590769</id><published>2009-01-16T11:41:00.000-05:00</published><updated>2009-01-16T11:41:00.000-05:00</updated><title type='text'>@marc, that's smart testing! It's also one of the ...</title><content type='html'>@marc, that's smart testing! It's also one of the TestNG approaches I want us to build into mxunit - dataprovider.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/458130604009590769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/458130604009590769'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html?showComment=1232124060000#c458130604009590769' title=''/><author><name>billy</name><uri>http://www.blogger.com/profile/06624894387927690246</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17359140296736057249'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_R-2JPB8crqk/SUEE7sNuL1I/AAAAAAAAAGU/-bo1g6-m8fk/S220/che3.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html' ref='tag:blogger.com,1999:blog-1973750947775262558.post-1164878444527806335' source='http://www.blogger.com/feeds/1973750947775262558/posts/default/1164878444527806335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1094271333'/></entry><entry><id>tag:blogger.com,1999:blog-1973750947775262558.post-4448022412566210345</id><published>2009-01-16T11:27:00.000-05:00</published><updated>2009-01-16T11:27:00.000-05:00</updated><title type='text'>@bill, I see that now. Good stuff!</title><content type='html'>@bill, I see that now. Good stuff!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/4448022412566210345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/4448022412566210345'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html?showComment=1232123220000#c4448022412566210345' title=''/><author><name>Oscar Arevalo</name><uri>http://www.oscararevalo.com</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://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html' ref='tag:blogger.com,1999:blog-1973750947775262558.post-1164878444527806335' source='http://www.blogger.com/feeds/1973750947775262558/posts/default/1164878444527806335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1674524505'/></entry><entry><id>tag:blogger.com,1999:blog-1973750947775262558.post-8972149088244148224</id><published>2009-01-16T10:35:00.000-05:00</published><updated>2009-01-16T10:35:00.000-05:00</updated><title type='text'>Thinking out loud here, and maybe this is just stu...</title><content type='html'>Thinking out loud here, and maybe this is just stupid, but when I think of truth table logic, I'll often write tests that use.... tables.&lt;BR/&gt;&lt;BR/&gt;I create a private function in the test, and within that, i'll use cfquerysim to generate my table.&lt;BR/&gt;&lt;BR/&gt;then, the test itself will loop over that test, run my functionUnderTest with each of the inputs corresponding to a single row in the table.&lt;BR/&gt;&lt;BR/&gt;If something happens I don't expect to happen, then I'll append that to a structure. I do this so that the test does NOT fail fast... I want every scenario to be run.&lt;BR/&gt;&lt;BR/&gt;Then, at the end of the test, I'll write an assertion on that resultant structure.&lt;BR/&gt;&lt;BR/&gt;Here's a quickie example of what I'm talking about. This is thoroughly untested!&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;[cffunction name="usernameShouldFailForSpecifiedReason"]&lt;BR/&gt;  [cfset var table = createValidatorTruthTable()]&lt;BR/&gt;  [cfset results = StructNew()]&lt;BR/&gt;  [cfloop query="table"]&lt;BR/&gt;  &lt;BR/&gt;   [cfif table.ExpectedException eq ""]&lt;BR/&gt;    [cfset tmp = obj.createLogin(table.username,table.password)]&lt;BR/&gt;    [cfif NOT tmp.success]&lt;BR/&gt;     [cfset results["#username#_#password#_ShouldNotFailButDid"]]&lt;BR/&gt;    [/cfif]&lt;BR/&gt;   [cfelse]&lt;BR/&gt;    [cftry]&lt;BR/&gt;     [cfset tmp = obj.createLogin(table.username,table.password)]&lt;BR/&gt;     [cfthrow message="#ExpectedException#_ShouldFailButDidNot"]&lt;BR/&gt;    [cfcatch type="#ExpectedException#"][!--- do nothing... that's what we want ---][/cfcatch]&lt;BR/&gt;    [cfcatch]&lt;BR/&gt;     [cfset results["#username#_#password#_#cfcatch.message#"]]&lt;BR/&gt;    [/cfcatch]&lt;BR/&gt;    [/cftry]   &lt;BR/&gt;   &lt;BR/&gt;   [/cfif]&lt;BR/&gt;  &lt;BR/&gt;  [/cfloop]&lt;BR/&gt;  [cfset debug(results)]&lt;BR/&gt;  [cfset assertEquals(0,ArrayLen(results),"The following combinations failed: #StructKeyList(results)#")]&lt;BR/&gt;  &lt;BR/&gt; [/cffunction]&lt;BR/&gt; &lt;BR/&gt; &lt;BR/&gt; [cffunction name="createValidatorTruthTable" access="private"]&lt;BR/&gt; &lt;BR/&gt;  [cfset var q = ""]&lt;BR/&gt;  [cfoutput]&lt;BR/&gt;  [cf_querysim]&lt;BR/&gt;  q&lt;BR/&gt;  username|password|ExpectedException&lt;BR/&gt;  mesher|easy|TooShortException&lt;BR/&gt;  mesher|l33thx04||&lt;BR/&gt;  mesher|nopunct|nopunctuation&lt;BR/&gt;  ........&lt;BR/&gt;  [/cf_querysim]&lt;BR/&gt;  [/cfoutput]&lt;BR/&gt;  [cfreturn q] &lt;BR/&gt; &lt;BR/&gt; [/cffunction]</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/8972149088244148224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/8972149088244148224'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html?showComment=1232120100000#c8972149088244148224' title=''/><author><name>Marc Esher</name><uri>http://www.blogger.com/profile/05942611191966201181</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.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html' ref='tag:blogger.com,1999:blog-1973750947775262558.post-1164878444527806335' source='http://www.blogger.com/feeds/1973750947775262558/posts/default/1164878444527806335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-260340863'/></entry><entry><id>tag:blogger.com,1999:blog-1973750947775262558.post-1850566826483946649</id><published>2009-01-16T10:09:00.000-05:00</published><updated>2009-01-16T10:09:00.000-05:00</updated><title type='text'>@Oscar, good point. In general, I feel that there ...</title><content type='html'>@Oscar, good point. In general, I feel that there is no good solution to reducing the "amount" of tests here or elsewhere. We can, however, create tests that are clearer, more targeted, and easier to maintain. This approach really is aimed at breaking down the complexity of conditional logic into smaller more manageable pieces. A real-world value, I see, is when the production code is executed and fails, you will know exactly what failed and why. You could then display that info back to the user.&lt;BR/&gt;&lt;BR/&gt;thanks,&lt;BR/&gt;bill</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/1850566826483946649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/1850566826483946649'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html?showComment=1232118540000#c1850566826483946649' title=''/><author><name>billy</name><uri>http://www.blogger.com/profile/06624894387927690246</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17359140296736057249'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_R-2JPB8crqk/SUEE7sNuL1I/AAAAAAAAAGU/-bo1g6-m8fk/S220/che3.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html' ref='tag:blogger.com,1999:blog-1973750947775262558.post-1164878444527806335' source='http://www.blogger.com/feeds/1973750947775262558/posts/default/1164878444527806335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1094271333'/></entry><entry><id>tag:blogger.com,1999:blog-1973750947775262558.post-764340553088000021</id><published>2009-01-16T09:41:00.000-05:00</published><updated>2009-01-16T09:41:00.000-05:00</updated><title type='text'>I see how this refactoring makes for a much better...</title><content type='html'>I see how this refactoring makes for a much better code and is way easier to read, but the part that I'm missing is that I don't see how the use of the validator object will cut down on the test cases you need to check. The different constraints are still there and your test code still needs to test each one of those conditions (and their combinations). So if the idea is to reduce the testing I'm not really seeing how that is achieved. Can you please clarify that?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/764340553088000021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/764340553088000021'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html?showComment=1232116860000#c764340553088000021' title=''/><author><name>Oscar Arevalo</name><uri>http://www.oscararevalo.com</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://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html' ref='tag:blogger.com,1999:blog-1973750947775262558.post-1164878444527806335' source='http://www.blogger.com/feeds/1973750947775262558/posts/default/1164878444527806335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1227717871'/></entry><entry><id>tag:blogger.com,1999:blog-1973750947775262558.post-7917404632369649220</id><published>2009-01-16T07:51:00.000-05:00</published><updated>2009-01-16T07:51:00.000-05:00</updated><title type='text'>@Ilya ...I, too, now have an additional 10K SLOC t...</title><content type='html'>@Ilya ...I, too, now have an additional 10K SLOC to refactor ;-) thanks! bill</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/7917404632369649220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/7917404632369649220'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html?showComment=1232110260000#c7917404632369649220' title=''/><author><name>billy</name><uri>http://www.blogger.com/profile/06624894387927690246</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17359140296736057249'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://4.bp.blogspot.com/_R-2JPB8crqk/SUEE7sNuL1I/AAAAAAAAAGU/-bo1g6-m8fk/S220/che3.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html' ref='tag:blogger.com,1999:blog-1973750947775262558.post-1164878444527806335' source='http://www.blogger.com/feeds/1973750947775262558/posts/default/1164878444527806335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1094271333'/></entry><entry><id>tag:blogger.com,1999:blog-1973750947775262558.post-9035321379331474125</id><published>2009-01-15T22:23:00.000-05:00</published><updated>2009-01-15T22:23:00.000-05:00</updated><title type='text'>Makes me want to go and immediately rewrite a ton ...</title><content type='html'>Makes me want to go and immediately rewrite a ton of my code. This looks very elegant. Thanks for a great post.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/9035321379331474125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1973750947775262558/1164878444527806335/comments/default/9035321379331474125'/><link rel='alternate' type='text/html' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html?showComment=1232076180000#c9035321379331474125' title=''/><author><name>Ilya Fedotov</name><uri>http://www.blogger.com/profile/10183314773929447378</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='32' height='28' src='http://bp3.blogger.com/_QMFB8ny-E7g/SHZFC5lohOI/AAAAAAAAAA0/rR768Z2bpVs/S220/ilyaportret.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html' ref='tag:blogger.com,1999:blog-1973750947775262558.post-1164878444527806335' source='http://www.blogger.com/feeds/1973750947775262558/posts/default/1164878444527806335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2041573797'/></entry></feed>
