<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Object Mentor Blog: Moq examples, Part II</title>
    <link>http://blog.objectmentor.com/articles/2009/05/25/moq-examples-part-ii</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Moq examples, Part II</title>
      <description>&lt;p&gt;&lt;a href="http://blog.objectmentor.com/articles/2009/05/19/a-first-look-at-moq"&gt;A few blog articles ago&lt;/a&gt; I showed some examples using Moq. I created those examples in anticipation of using Moq in a &lt;span class="caps"&gt;TDD&lt;/span&gt; class with a group in Canada.&lt;/p&gt;


	&lt;p&gt;What I ended up creating was different for a number of reasons. The final version is somewhat cleaned up compared to those first examples, so here are those examples as well: &lt;a href="http://schuchert.wikispaces.com/Moq.Logging+In+Example+Implemented"&gt;actual test class created&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;These tests are not really that different from the first version, other than I did not use exceptions as much.&lt;/p&gt;


After the underlying LoginService was created with these tests, I had the students refactor to the GoF State Design Pattern. If you&amp;#8217;re feeling like a little practice, consider:
	&lt;ul&gt;
	&lt;li&gt;Creating one test at a time&lt;/li&gt;
		&lt;li&gt;Write the underlying service&lt;/li&gt;
		&lt;li&gt;When all tests are passing, try to refactor to the state pattern.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;It&amp;#8217;s a good exercise. The guys in Canada seemed to really grok Moq and started using it to characterize their actual code the next day.&lt;/p&gt;</description>
      <pubDate>Mon, 25 May 2009 21:57:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:cc7851f6-5d05-4623-83f9-f98210dc8845</guid>
      <author>Brett Schuchert</author>
      <link>http://blog.objectmentor.com/articles/2009/05/25/moq-examples-part-ii</link>
      <category>Schuchert's Scattered Synapses </category>
      <category>moq</category>
      <category>c</category>
      <category>TDD</category>
      <category>state</category>
    </item>
    <item>
      <title>"Moq examples, Part II" by han</title>
      <description>&lt;p&gt;&lt;a href="http://www.ipadvideoconverters.biz" rel="nofollow"&gt;http://www.ipadvideoconverters.biz&lt;/a&gt;       iPad Video Converter iPad Video Converter is a great software for iPad lovers to convert videos to iPad with super fast speed and high quality. Its easy-to-use interface makes iPad to videos conversion routine very simple. And also it can keep the original quality of video files.&lt;/p&gt;</description>
      <pubDate>Mon, 19 Apr 2010 00:06:36 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:24250c47-d64e-464f-8d6a-c868dc30bc74</guid>
      <link>http://blog.objectmentor.com/articles/2009/05/25/moq-examples-part-ii#comment-10099</link>
    </item>
    <item>
      <title>"Moq examples, Part II" by FLV extractor</title>
      <description>&lt;p&gt;just read the article&lt;/p&gt;</description>
      <pubDate>Wed, 07 Apr 2010 03:27:40 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:117e25ce-d31b-4dd3-84ea-3a1e020a4311</guid>
      <link>http://blog.objectmentor.com/articles/2009/05/25/moq-examples-part-ii#comment-9284</link>
    </item>
    <item>
      <title>"Moq examples, Part II" by http://www.emicsoft.com/shelleybj09@yahoo.com</title>
      <description>&lt;p&gt;Studies serve for delight, for ornament, and for ability. Their chief use for delight, is in privateness and retiring; for&lt;/p&gt;


	&lt;p&gt;ornament, is in discourse; and for ability, is in the judgment and disposition of business.&lt;/p&gt;</description>
      <pubDate>Fri, 26 Mar 2010 00:25:41 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:9c0c1b73-f618-4d27-aaba-7265cf3fe016</guid>
      <link>http://blog.objectmentor.com/articles/2009/05/25/moq-examples-part-ii#comment-8269</link>
    </item>
    <item>
      <title>"Moq examples, Part II" by mod converter</title>
      <description>&lt;p&gt;so it is the status.&lt;/p&gt;</description>
      <pubDate>Thu, 04 Feb 2010 19:34:02 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:d98fcdcb-f01c-4465-b8f6-112296b44aef</guid>
      <link>http://blog.objectmentor.com/articles/2009/05/25/moq-examples-part-ii#comment-7442</link>
    </item>
    <item>
      <title>"Moq examples, Part II" by mod converter</title>
      <description>&lt;p&gt;they both fit the code/&lt;/p&gt;</description>
      <pubDate>Thu, 04 Feb 2010 19:33:34 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:3439edc1-ff4e-4da9-a6dd-8af052a74a68</guid>
      <link>http://blog.objectmentor.com/articles/2009/05/25/moq-examples-part-ii#comment-7441</link>
    </item>
    <item>
      <title>"Moq examples, Part II" by nike shoes hosting</title>
      <description>&lt;p&gt;These tests are not really that different from the first version, other than I did not use exceptions as much.&lt;/p&gt;</description>
      <pubDate>Thu, 03 Dec 2009 06:31:08 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:aba6d8f4-1cc4-466b-9ce1-f520732f0831</guid>
      <link>http://blog.objectmentor.com/articles/2009/05/25/moq-examples-part-ii#comment-5363</link>
    </item>
  </channel>
</rss>
