<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Bob&apos;s Blog - ColdFusion Tidbits - MXUnit</title>
			<link>http://www.silverwareconsulting.com/index.cfm</link>
			<description>Some stuff about ColdFusion and Transfer</description>
			<language>en-us</language>
			<pubDate>Thu, 09 Sep 2010 05:04:37 -0400</pubDate>
			<lastBuildDate>Thu, 01 Apr 2010 17:24:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>bob.silverberg@gmail.com</managingEditor>
			<webMaster>bob.silverberg@gmail.com</webMaster>
			
			<item>
				<title>I&apos;m Invading Your Airwaves Again</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2010/4/1/Im-Invading-Your-Airwaves-Again</link>
				<description>
				
				Yes, once again I&apos;ve been interviewed for a ColdFusion podcast, and this time it&apos;s &lt;a href=&quot;http://www.cfhour.com/&quot; target=&quot;_blank&quot;&gt;CFHour&lt;/a&gt;. 
&lt;a href=&quot;http://blog.dkferguson.com/&quot; target=&quot;_blank&quot;&gt;Dave&lt;/a&gt; and &lt;a href=&quot;http://coldfusionnotes.com/&quot; target=&quot;_blank&quot;&gt;Mike&lt;/a&gt; 
allowed me to wax poetically about a wide range of topics including 
&lt;a href=&quot;http://www.validatethis.org/&quot; target=&quot;_blank&quot;&gt;ValidateThis&lt;/a&gt;, my validation framework for ColdFusion objects, 
the upcoming &lt;a href=&quot;http://www.cfobjective.com/&quot; target=&quot;_blank&quot;&gt;cf.Objective()&lt;/a&gt; conference 
and the &lt;a href=&quot;http://www.cfobjective.com/index.cfm/pre-conf/&quot; target=&quot;_blank&quot;&gt;pre-conference training&lt;/a&gt;
that will be available,
&lt;a href=&quot;http://www.model-glue.com/&quot; target=&quot;_blank&quot;&gt;Model-Glue&lt;/a&gt;, specifically some of the new features that will be included in version 3.2,
&lt;a href=&quot;http://mxunit.org/&quot; target=&quot;_blank&quot;&gt;MXUnit&lt;/a&gt;, again talking about what&apos;s coming in version 2.0,
and Dave also tricked me into weighing in on the CFBuilder debate.&lt;/p&gt;
&lt;p&gt;It was a lot of fun, and I really appreciate being given the opportunity to let people know about all of this great stuff
that is available to the ColdFusion community. If you don&apos;t mind listening to my Canadian accent for close to an hour, 
I encourage you to give it a listen. It&apos;s available via iTunes, and can also be listened to or downloaded directly from the 
&lt;a href=&quot;http://www.cfhour.com/post.cfm/show-47-the-bob-silverberg-show&quot; target=&quot;_blank&quot;&gt;show page&lt;/a&gt;.&lt;/p&gt; 
				</description>
				
				<category>Model-Glue</category>				
				
				<category>ValidateThis</category>				
				
				<category>cfObjective</category>				
				
				<category>MXUnit</category>				
				
				<pubDate>Thu, 01 Apr 2010 17:24:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2010/4/1/Im-Invading-Your-Airwaves-Again</guid>
				
			</item>
			
			<item>
				<title>New Stuff for MXUnit, Model-Glue and ValidateThis on the Horizon</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2009/12/17/New-Stuff-for-MXUnit-ModelGlue-and-ValidateThis-on-the-Horizon</link>
				<description>
				
				I&apos;ve been extremely busy over the past couple of months on a number of projects, both for clients and open source, which has lowered my blog post output to approximately zilch.&lt;/p&gt; 
&lt;p&gt;I thought I would write a quick note about some items that I&apos;ve been working on, and that should hopefully see the light of day in the ColdFusion open source world in the near future.&lt;/p&gt;
&lt;h3&gt;MXUnit Mocking Integration&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;http://blog.mxunit.org/&quot; target=&quot;_blank&quot;&gt;Bill Shelton&lt;/a&gt;, of &lt;a href=&quot;http://www.mxunit.org/&quot; target=&quot;_blank&quot;&gt;MXUnit&lt;/a&gt; fame, has written a mocking framework called &lt;a href=&quot;http://sites.google.com/site/mightymock/&quot; target=&quot;_blank&quot;&gt;MightyMock&lt;/a&gt;
 that has been close to being released for quite some time. I&apos;ve used it and I liked it a lot.
Bill and I discussed integrating it with MXUnit itself, to make mocking super easy for developers using MXUnit, and during the discussions we realized that it would be nice if
MXUnit could support generating mocks via any framework, not just MightyMock. I set out to build a plugin architecture that would allow for any ColdFusion based mocking framework to be used with MXUnit.
Thus far I have it working with MightyMock, &lt;a href=&quot;http://coldmock.riaforge.org/&quot; target=&quot;_blank&quot;&gt;ColdMock&lt;/a&gt; and &lt;a href=&quot;http://ortus.svnrepository.com/coldbox/trac.cgi/wiki/cbMockBox&quot; target=&quot;_blank&quot;&gt;MockBox&lt;/a&gt;.
 We&apos;re still working on the final bits and pieces, but if anyone is interested in giving it a try let me know and I can point you in the right direction.
&lt;/p&gt;
&lt;h3&gt;Model-Glue ColdFusion 9 ORM Support&lt;/h3&gt;
&lt;p&gt;If you&apos;re a user of the &lt;a href=&quot;http://www.model-glue.com/coldfusion.cfm&quot; target=&quot;_blank&quot;&gt;Model-Glue MVC Framework&lt;/a&gt; you&apos;re probably aware of the fact
that a couple of ColdFusion ORMs (namely &lt;a href=&quot;http://www.transfer-orm.com/&quot; target=&quot;_blank&quot;&gt;Transfer&lt;/a&gt; and &lt;a href=&quot;http://trac.reactorframework.com/&quot; target=&quot;_blank&quot;&gt;Reactor&lt;/a&gt;)
can be used quite seamlessly with the framework via what&apos;s referred to as an ORM Adapter.  This allows Model-Glue developers to take advantage of Generic Database Messages (GDMs), which provide for automatic CRUD (creating, reading, updating and deleting records in database tables)
as well as basic listings. These GDMs also form a part of a feature called Scaffolds, which takes the automation even further by generating view and controller code for maintaining database tables. Using Scaffolds you can get a complete CRUD solution up and running in a matter of minutes.&lt;/p&gt;
&lt;p&gt;With the release of ColdFusion 9 there&apos;s a new ORM player in the game, namely ColdFusion itself, with its new Hibernate integration. 
&lt;a href=&quot;http://blog.bullamakanka.net/&quot; target=&quot;_blank&quot;&gt;Dennis Clark&lt;/a&gt; and I have been developing a Model-Glue ORM adapter for ColdFusion 9&apos;s built-in ORM and it is nearly ready to be released.
If you are interested in taking a look at it, or willing to help with testing it, please let me know.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;http://docs.model-glue.com/&quot; target=&quot;_blank&quot;&gt;Model-Glue Documentation&lt;/a&gt; has more information available on both
&lt;a href=&quot;http://docs.model-glue.com/wiki/HowTos/HowToUseGenericDatabaseMessages&quot; target=&quot;_blank&quot;&gt;Generic Database Messages&lt;/a&gt; and &lt;a href=&quot;http://docs.model-glue.com/wiki/HowTos/HowToUseScaffolds&quot; target=&quot;_blank&quot;&gt;Scaffolds&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;ValidateThis CF9/ColdBox Sample Application&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;http://www.aliaspooryorik.com/&quot; target=&quot;_blank&quot;&gt;John Whish&lt;/a&gt; has been kind enough to contribute some bug fixes and enhancements to the &lt;a href=&quot;http://www.validatethis.org/&quot; target=&quot;_blank&quot;&gt;ValidateThis&lt;/a&gt; core,
as well as the &lt;a href=&quot;http://www.coldbox.org/&quot; target=&quot;_blank&quot;&gt;ColdBox&lt;/a&gt; plugin. He&apos;s also been working on a ValidateThis/ColdBox 3/CF9 ORM sample application, which I plan to contribute to as well and should be made available in the near future.
&lt;/p&gt;
&lt;h3&gt;ValidateThis CFWheels Integration&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;http://www.henke.ws/&quot; target=&quot;_blank&quot;&gt;Mike Henke&lt;/a&gt; and I have been working on getting ValidateThis to work with the &lt;a href=&quot;http://cfwheels.org/&quot; target=&quot;_blank&quot;&gt;ColdFusion on Wheels framework&lt;/a&gt;,
 which just celebrated its &lt;a href=&quot;http://cfwheels.org/blog/index.cfm/2009/11/24/Wheels-10-Were-Production-Ready&quot; target=&quot;_blank&quot;&gt;1.0 release&lt;/a&gt;. 
Although ValidateThis is designed to be totally framework agnostic (meaning it can be used with any framework without modification), because it is designed to validate ColdFusion objects, it relied on the fact that
those objects would expose getters for each of their properties.  That is standard practice throughout most of the CF world, but Wheels is a bit different. Its objects do not have getters for their properties,
so the server-side validations were unable to determine the values of any properties, which rendered them useless.&lt;/p&gt;
&lt;p&gt;Thanks to the encapsulation afforded by a decent object oriented design, I was able to enable
ValidateThis to work with these new types of objects (which don&apos;t have getters) with a couple of minor code changes to the framework. 
Mike and I now have a version of ValidateThis that works with traditional objects as well as with &quot;Wheels style&quot; objects. Mike is also working on a new ValidateThis sample application, using CFWheels.
Once we&apos;re done testing and have a decent sample application this new version of ValidateThis will be released, along with the new sample.&lt;/p&gt;
&lt;h3&gt;ColdFusion 9 ORM Training&lt;/h3&gt;
&lt;p&gt;Finally, I&apos;d just like to mention that &lt;a href=&quot;http://www.compoundtheory.com/&quot; target=&quot;_blank&quot;&gt;Mark Mandel&lt;/a&gt; and I will be delivering a comprehensive two-day, hands-on course covering Developing Applications with ColdFusion 9&apos;s new ORM features as a pre-Conference workshop at &lt;a href=&quot;http://www.cfobjective.com/&quot; target=&quot;_blank&quot;&gt;cf.Objective()&lt;/a&gt; this year. The course will run from April 20th to April 21st, 2010. Much more info will be available soon.
&lt;/p&gt;
&lt;p&gt;Happy Holidays everyone!&lt;/p&gt; 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>CF ORM Integration</category>				
				
				<category>Coldbox</category>				
				
				<category>ValidateThis</category>				
				
				<category>cfObjective</category>				
				
				<category>MXUnit</category>				
				
				<pubDate>Thu, 17 Dec 2009 14:27:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2009/12/17/New-Stuff-for-MXUnit-ModelGlue-and-ValidateThis-on-the-Horizon</guid>
				
			</item>
			
			<item>
				<title>Using MXUnit&apos;s injectMethod() to Reverse an injectMethod() call</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2009/7/14/Using-MXUnits-injectMethod-to-Reverse-an-injectMethod-call</link>
				<description>
				
				I encountered a situation today in which I wanted to reverse the effects of an injectMethod() call in an &lt;a href=&quot;http://mxunit.org/&quot; target=&quot;_blank&quot;&gt;MXUnit&lt;/a&gt; ColdFusion unit test. Here&apos;s some code that resembles my test case:
&lt;code&gt;
&lt;cfcomponent extends=&quot;mxunit.framework.TestCase&quot;&gt;

&lt;cffunction name=&quot;setUp&quot; access=&quot;public&quot; returntype=&quot;void&quot;&gt;
	&lt;cfscript&gt;
		variables.CUT = CreateObject(&quot;component&quot;,&quot;myComponentUnderTest&quot;);
	&lt;/cfscript&gt;  
&lt;/cffunction&gt;

&lt;cffunction name=&quot;test1IsActuallyProperlyNamed&quot; access=&quot;public&quot; returntype=&quot;void&quot;&gt;
	&lt;cfscript&gt;
		injectMethod(variables.CUT, this, &quot;overrideVerifyToTrue&quot;, &quot;verify&quot;);
		assertTrue(variables.CUT.aMethodThatWantsVerifyToReturnTrue());
	&lt;/cfscript&gt;  
&lt;/cffunction&gt;

&lt;cffunction name=&quot;test2IsActuallyProperlyNamed&quot; access=&quot;public&quot; returntype=&quot;void&quot;&gt;
	&lt;cfscript&gt;
		injectMethod(variables.CUT, this, &quot;overrideVerifyToTrue&quot;, &quot;verify&quot;);
		assertTrue(variables.CUT.anotherMethodThatWantsVerifyToReturnTrue());
	&lt;/cfscript&gt;  
&lt;/cffunction&gt;

&lt;cffunction name=&quot;test3IsActuallyProperlyNamed&quot; access=&quot;public&quot; returntype=&quot;void&quot;&gt;
	&lt;cfscript&gt;
		injectMethod(variables.CUT, this, &quot;overrideVerifyToTrue&quot;, &quot;verify&quot;);
		assertTrue(variables.CUT.aThirdMethodThatWantsVerifyToReturnTrue());
	&lt;/cfscript&gt;  
&lt;/cffunction&gt;

&lt;cffunction name=&quot;test4IsActuallyProperlyNamed&quot; access=&quot;public&quot; returntype=&quot;void&quot;&gt;
	&lt;cfscript&gt;
		assertTrue(variables.CUT.aMethodThatWantsVerifyToBehaveAsCoded());
	&lt;/cfscript&gt;  
&lt;/cffunction&gt;

&lt;cffunction name=&quot;overrideVerifyToTrue&quot; access=&quot;private&quot; returntype=&quot;Any&quot; hint=&quot;will be used as a test-time override with injectMethod()&quot;&gt;
	&lt;cfreturn true /&gt;
&lt;/cffunction&gt;

&lt;/cfcomponent&gt;
&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;From the above we can see that the first three tests want the method called verify() in the Component Under Test (CUT) to return TRUE, so we use injectMethod() to take a fake method (overrideVerifyToTrue), and use it to replace the actual verify() method in the CUT.  The last test wants the verify() method in the CUT to behave as it&apos;s coded, so it doesn&apos;t call injectMethod().  This all works, but it introduces some duplication that I&apos;d rather not have; I have to issue the same injectMethod() call in most of the tests. To remove that duplication I&apos;d like to be able to move the call to injectMethod() into the setup() function. But, if I move injectMethod() into the setup() function, I&apos;d need a way to &quot;undo&quot; the injectMethod() call in the final test.  [More]
				</description>
				
				<category>ColdFusion</category>				
				
				<category>MXUnit</category>				
				
				<pubDate>Tue, 14 Jul 2009 14:15:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2009/7/14/Using-MXUnits-injectMethod-to-Reverse-an-injectMethod-call</guid>
				
			</item>
			
			<item>
				<title>Some Benefits of Unit Testing</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2008/9/10/Some-Benefits-of-Unit-Testing</link>
				<description>
				
				I must start by saying that, as much as I like option groups, I &lt;em&gt;&lt;strong&gt;love&lt;/strong&gt;&lt;/em&gt; Unit Testing.  I had written previously that &lt;a href=&quot;http://www.silverwareconsulting.com/index.cfm/2008/7/7/I-Like-Unit-Testing&quot;&gt;I Like Unit Testing&lt;/a&gt;, but that brief infatuation has blossomed into a full blown love affair.  I have two people/groups to thank for that, &lt;a href=&quot;http://www.fancybread.com/blog/&quot; target=&quot;_blank&quot;&gt;Paul Marcotte&lt;/a&gt; and &lt;a href=&quot;http://mxunit.org/&quot; target=&quot;_blank&quot;&gt;the MXUnit Team&lt;/a&gt;, who produce an excellent suite of unit testing tools for ColdFusion.&lt;/p&gt;
&lt;p&gt;I met with Paul in the Toronto airport a couple of weeks ago during a brief stopover (his, not mine) and he walked me through his current methodology for unit testing.  He really cleared up some areas of confusion for me, and essentially handed over a set of practices that makes everything oh so easy.  He&apos;s been blogging about his technique in &lt;a href=&quot;http://www.fancybread.com/blog/index.cfm/Test-Driven-Development&quot; target=&quot;_blank&quot;&gt;a series&lt;/a&gt; that I heartily recommend.&lt;/p&gt;
&lt;p&gt;And what can I say about &lt;a href=&quot;http://mxunit.org/&quot; target=&quot;_blank&quot;&gt;MXUnit&lt;/a&gt; that hasn&apos;t already been said?  It totally rocks!  The Eclipse Plugin is da bomb!  If you haven&apos;t checked it out, do so.  Now.  &apos;Nuff said.&lt;/p&gt;
&lt;p&gt;So when do I get to hear about &quot;Some Benefits of Unit Testing&quot;, you may be asking?  Read on.  [More]
				</description>
				
				<category>TDD</category>				
				
				<category>ColdFusion</category>				
				
				<category>MXUnit</category>				
				
				<category>OO Design</category>				
				
				<pubDate>Wed, 10 Sep 2008 06:32:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2008/9/10/Some-Benefits-of-Unit-Testing</guid>
				
			</item>
			
			<item>
				<title>I Like Unit Testing</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2008/7/7/I-Like-Unit-Testing</link>
				<description>
				
				I never imagined that I&apos;d say those words, but they&apos;re true.  I must start by admitting that I wrote my first unit test a few days ago.  I know, I&apos;m bad, I should have been doing this for years.  I&apos;ve known about unit testing for a long time, I&apos;ve been reading more and more about it, and listening to speakers at conferences extol its virtues.  But somehow I just couldn&apos;t get my a$$ in gear.  It just seemed like too much extra work.  And as a sole developer working on relatively small projects I was able to get away with not doing it.&lt;/p&gt;
&lt;p&gt;Anyway, I read a &lt;a href=&quot;http://www.bryantwebconsulting.com/blog/index.cfm/2008/7/2/An-Introduction-to-Writing-Unit-Tests-with-CFUnit&quot;&gt;blog post&lt;/a&gt; a few days ago that inspired me to take the plunge.  The post describes unit testing with &lt;a href=&quot;http://cfunit.sourceforge.net/&quot;&gt;CFUnit&lt;/a&gt;, but I&apos;d been hearing a lot of good things about &lt;a href=&quot;http://mxunit.org/&quot;&gt;MXUnit&lt;/a&gt;, so I decided to give that a try.&lt;/p&gt;  [More]
				</description>
				
				<category>TDD</category>				
				
				<category>ColdFusion</category>				
				
				<category>MXUnit</category>				
				
				<pubDate>Mon, 07 Jul 2008 06:15:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2008/7/7/I-Like-Unit-Testing</guid>
				
			</item>
			</channel></rss>