<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://httphandler.codebetter.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Karl Seguin - All Comments</title><link>http://httphandler.codebetter.com/blogs/karlseguin/default.aspx</link><description>.NET From Ottawa, Ontario - http://twitter.com/karlseguin/</description><dc:language>en</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>re: Resharper 4</title><link>http://httphandler.codebetter.com/blogs/karlseguin/archive/2008/06/12/resharper-4.aspx#183829</link><pubDate>Mon, 13 Oct 2008 15:24:53 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:183829</guid><dc:creator>Valued Customer</dc:creator><description>&lt;p&gt;Anyone having a bad taste in their mouth from 4.0, definitely give the new 4.1 a try - the performance and stability have improved tremendously.&lt;/p&gt;
&lt;img src="http://httphandler.codebetter.com/aggbug.aspx?PostID=183829" width="1" height="1"&gt;</description></item><item><title>re: What's Up Doc</title><link>http://httphandler.codebetter.com/blogs/karlseguin/archive/2008/09/06/what-s-up-doc.aspx#183766</link><pubDate>Fri, 10 Oct 2008 15:52:56 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:183766</guid><dc:creator>Manoj Waikar</dc:creator><description>&lt;p&gt;Thanks Karl, that worked :)&lt;/p&gt;
&lt;p&gt;And thanks for the &amp;quot;Foundations of Programming&amp;quot; e-book too, it had some real practical guidance.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Manoj.&lt;/p&gt;
&lt;img src="http://httphandler.codebetter.com/aggbug.aspx?PostID=183766" width="1" height="1"&gt;</description></item><item><title>re: What's Up Doc</title><link>http://httphandler.codebetter.com/blogs/karlseguin/archive/2008/09/06/what-s-up-doc.aspx#183750</link><pubDate>Fri, 10 Oct 2008 01:09:03 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:183750</guid><dc:creator>karl</dc:creator><description>&lt;p&gt;Manoj:&lt;/p&gt;
&lt;p&gt;Try checking out your the ItemCache, I think templates are cached there and that might be what you're saying. Not 100% sure though:&lt;/p&gt;
&lt;p&gt;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplatesCache&lt;/p&gt;
&lt;img src="http://httphandler.codebetter.com/aggbug.aspx?PostID=183750" width="1" height="1"&gt;</description></item><item><title>re: What's Up Doc</title><link>http://httphandler.codebetter.com/blogs/karlseguin/archive/2008/09/06/what-s-up-doc.aspx#183748</link><pubDate>Thu, 09 Oct 2008 16:44:56 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:183748</guid><dc:creator>Manoj Waikar</dc:creator><description>&lt;p&gt;Hi Karl,&lt;/p&gt;
&lt;p&gt;It might be a dumb question, but I changed the Class.cs file in the Class.zip file, in the folder &amp;quot;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Code\1033&amp;quot; folder to get a modified template, but it doesn't work.&lt;/p&gt;
&lt;p&gt;When I add a new class, VS still generates the definition based on the old template. Any idea why?&lt;/p&gt;
&lt;p&gt;Thanks and regards,&lt;/p&gt;
&lt;p&gt;Manoj.&lt;/p&gt;
&lt;img src="http://httphandler.codebetter.com/aggbug.aspx?PostID=183748" width="1" height="1"&gt;</description></item><item><title>re: Password : You're doing it wrong</title><link>http://httphandler.codebetter.com/blogs/karlseguin/archive/2008/07/30/password-you-re-doing-it-wrong.aspx#183739</link><pubDate>Thu, 09 Oct 2008 13:13:21 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:183739</guid><dc:creator>Laere</dc:creator><description>&lt;p&gt;I know it's a little late, but banks are champions of absurd limitations.&lt;/p&gt;
&lt;p&gt;In France, the LCL Bank has a rather strange policy on passwords:&lt;/p&gt;
&lt;p&gt;they must be exactly 8 characters long, only number, but passwords which are valid dates are forbidden, as passwords which contains twice the same number.&lt;/p&gt;
&lt;p&gt;yes, 12345678 is a valid password&lt;/p&gt;
&lt;p&gt;but 15331456 is not.&lt;/p&gt;
&lt;p&gt;I never found such an awful password policy.&lt;/p&gt;
&lt;img src="http://httphandler.codebetter.com/aggbug.aspx?PostID=183739" width="1" height="1"&gt;</description></item><item><title>NHibernate Collections - Dschungelcamp für Einsteiger</title><link>http://httphandler.codebetter.com/blogs/karlseguin/archive/2008/01/02/foundations-of-programming-part-6-nhibernate.aspx#183654</link><pubDate>Tue, 07 Oct 2008 16:16:24 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:183654</guid><dc:creator>Rainer Schuster</dc:creator><description>&lt;p&gt;Ich besch&amp;#228;ftige mich ja jetzt schon seit zwei bis drei Wochen mit NHibernate, aber &amp;#252;ber die Verwendung&lt;/p&gt;
&lt;img src="http://httphandler.codebetter.com/aggbug.aspx?PostID=183654" width="1" height="1"&gt;</description></item><item><title>links for 2008-09-29 | the markfr ditherings</title><link>http://httphandler.codebetter.com/blogs/karlseguin/archive/2008/09/26/simplicity-is-key-to-successful-unit-testing.aspx#183420</link><pubDate>Tue, 30 Sep 2008 01:04:44 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:183420</guid><dc:creator>links for 2008-09-29 | the markfr ditherings</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;links for 2008-09-29 | the markfr ditherings&lt;/p&gt;
&lt;img src="http://httphandler.codebetter.com/aggbug.aspx?PostID=183420" width="1" height="1"&gt;</description></item><item><title>Reflective Perspective - Chris Alcock  &amp;raquo; The Morning Brew # 189</title><link>http://httphandler.codebetter.com/blogs/karlseguin/archive/2008/09/26/simplicity-is-key-to-successful-unit-testing.aspx#183400</link><pubDate>Mon, 29 Sep 2008 07:11:25 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:183400</guid><dc:creator>Reflective Perspective - Chris Alcock  » The Morning Brew # 189</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Reflective Perspective - Chris Alcock &amp;nbsp;&amp;amp;raquo; The Morning Brew # 189&lt;/p&gt;
&lt;img src="http://httphandler.codebetter.com/aggbug.aspx?PostID=183400" width="1" height="1"&gt;</description></item><item><title>2008 September 29 - Links for today &amp;laquo; My (almost) Daily Links</title><link>http://httphandler.codebetter.com/blogs/karlseguin/archive/2008/09/26/simplicity-is-key-to-successful-unit-testing.aspx#183399</link><pubDate>Mon, 29 Sep 2008 06:52:39 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:183399</guid><dc:creator>2008 September 29 - Links for today « My (almost) Daily Links</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;2008 September 29 - Links for today &amp;amp;laquo; My (almost) Daily Links&lt;/p&gt;
&lt;img src="http://httphandler.codebetter.com/aggbug.aspx?PostID=183399" width="1" height="1"&gt;</description></item><item><title>Arjan`s World    &amp;raquo; LINKBLOG for September 27, 2008</title><link>http://httphandler.codebetter.com/blogs/karlseguin/archive/2008/09/26/simplicity-is-key-to-successful-unit-testing.aspx#183372</link><pubDate>Sat, 27 Sep 2008 21:07:51 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:183372</guid><dc:creator>Arjan`s World    » LINKBLOG for September 27, 2008</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Arjan`s World &amp;nbsp; &amp;nbsp;&amp;amp;raquo; LINKBLOG for September 27, 2008&lt;/p&gt;
&lt;img src="http://httphandler.codebetter.com/aggbug.aspx?PostID=183372" width="1" height="1"&gt;</description></item><item><title>Dew Drop - September 27, 2008 | Alvin Ashcraft's Morning Dew</title><link>http://httphandler.codebetter.com/blogs/karlseguin/archive/2008/09/26/simplicity-is-key-to-successful-unit-testing.aspx#183365</link><pubDate>Sat, 27 Sep 2008 11:57:36 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:183365</guid><dc:creator>Dew Drop - September 27, 2008 | Alvin Ashcraft's Morning Dew</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Dew Drop - September 27, 2008 | Alvin Ashcraft's Morning Dew&lt;/p&gt;
&lt;img src="http://httphandler.codebetter.com/aggbug.aspx?PostID=183365" width="1" height="1"&gt;</description></item><item><title>re: Password : You're doing it wrong</title><link>http://httphandler.codebetter.com/blogs/karlseguin/archive/2008/07/30/password-you-re-doing-it-wrong.aspx#183362</link><pubDate>Sat, 27 Sep 2008 05:53:11 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:183362</guid><dc:creator>sisakat</dc:creator><description>&lt;p&gt;I just signed up for my bank's online thing, and I have to use a pin that is a four to ten digit number. &amp;nbsp;Now that I've read this I'm bothered that the place I expect to store my money safely is doing such a shody job of it. &amp;nbsp;I think I'll bug them about it.&lt;/p&gt;
&lt;img src="http://httphandler.codebetter.com/aggbug.aspx?PostID=183362" width="1" height="1"&gt;</description></item><item><title>re: Simplicity is key to successful unit testing</title><link>http://httphandler.codebetter.com/blogs/karlseguin/archive/2008/09/26/simplicity-is-key-to-successful-unit-testing.aspx#183343</link><pubDate>Fri, 26 Sep 2008 17:24:42 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:183343</guid><dc:creator>Jeremy D. Miller</dc:creator><description>&lt;p&gt;The &amp;quot;ShouldEqual(xxx)&amp;quot; and ShouldBeTheSameAs(xxx) extension methods from SpecUnit help make unit tests simpler and easier to read as well.&lt;/p&gt;
&lt;p&gt;For what you're doing in your BaseFixture, you might just use the RhinoAutoMocker&amp;lt;CLASSUNDERTEST&amp;gt; class in StructureMap, but it does assume that you're using DI for the CLASSUNDERTEST&lt;/p&gt;
&lt;img src="http://httphandler.codebetter.com/aggbug.aspx?PostID=183343" width="1" height="1"&gt;</description></item><item><title>re: Simplicity is key to successful unit testing</title><link>http://httphandler.codebetter.com/blogs/karlseguin/archive/2008/09/26/simplicity-is-key-to-successful-unit-testing.aspx#183341</link><pubDate>Fri, 26 Sep 2008 16:43:37 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:183341</guid><dc:creator>karl</dc:creator><description>&lt;p&gt;@Ryan:&lt;/p&gt;
&lt;p&gt;Good question. I left those details out on purpose for simplicity. In the last 2 examples (the controller code) I probably should have renamed repository to _repository so that it's a bit more clear its being loaded externally to the method (possibly through injection). In real life, I'd probably do:&lt;/p&gt;
&lt;p&gt;XXXRepository.CreateInstance() &amp;nbsp;which would call out to StructureMap (perhaps through additional abstractions).&lt;/p&gt;
&lt;p&gt;As for the unit test, I use a BaseFixture class that has methods like:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;protected T Dynamic&amp;lt;T&amp;gt;()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var mock = Mocks.DynamicMock&amp;lt;T&amp;gt;();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (typeof(T).IsInterface)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ObjectFactory.InjectStub(typeof (T), mock);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return mock;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;img src="http://httphandler.codebetter.com/aggbug.aspx?PostID=183341" width="1" height="1"&gt;</description></item><item><title>re: Simplicity is key to successful unit testing</title><link>http://httphandler.codebetter.com/blogs/karlseguin/archive/2008/09/26/simplicity-is-key-to-successful-unit-testing.aspx#183337</link><pubDate>Fri, 26 Sep 2008 15:40:03 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:183337</guid><dc:creator>Kevin Gao</dc:creator><description>&lt;p&gt;Good examples. Granularity is important for unit test cases. Or else, your cases are too easy to be broken.&lt;/p&gt;
&lt;img src="http://httphandler.codebetter.com/aggbug.aspx?PostID=183337" width="1" height="1"&gt;</description></item></channel></rss>