<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-2724692278714295115</atom:id><lastBuildDate>Mon, 12 Dec 2011 22:06:38 +0000</lastBuildDate><category>Twitter</category><category>UKSSUG</category><category>NxtGenUG</category><category>Performance</category><category>10Km Run</category><category>ASP .NET</category><category>Design</category><category>Rhino Mocks</category><category>Tortoise</category><category>CSLA</category><category>Charity</category><category>TypeMock</category><category>Agile</category><category>.NET Developer Network</category><category>Linq to SQL</category><category>Scrum</category><category>book review</category><category>MOSS</category><category>ALT .NET</category><category>SVN</category><category>WPF</category><category>Unit Testing</category><category>British Heart Foundation</category><category>Silverlight</category><category>eBook</category><category>WatiN</category><title>Richie's World</title><description>Where great things could happen, and maybe, just maybe they might!</description><link>http://richallen.blogspot.com/</link><managingEditor>noreply@blogger.com (Richard Allen)</managingEditor><generator>Blogger</generator><openSearch:totalResults>59</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/RichiesWorld" /><feedburner:info uri="richiesworld" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-2405265927752403907</guid><pubDate>Mon, 07 Nov 2011 16:24:00 +0000</pubDate><atom:updated>2011-11-07T08:24:26.171-08:00</atom:updated><title>Deploying a VSTO Click Once Add-in - don't forget your MIME Types!</title><description>&lt;p&gt;I just wanted to make a note of this for future reference and to help any one that might be struggling with this in the future:&lt;/p&gt; &lt;p&gt;I have just created a simple Excel 2007 office add-in and I wanted to deploy it to a local server on my intranet and allow other users to click a url and install the application. Using the project properties page I configured the relevant server details and successfully published the add-on on to the server.&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-nOtaRY3wrwo/TrgGNvc5EmI/AAAAAAAABoo/dapKt1QWECA/s1600-h/image%25255B4%25255D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" border="0" alt="image" src="http://lh4.ggpht.com/-KIAXwSw1rtU/TrgGOFX3buI/AAAAAAAABos/1yRaDhAbbyo/image_thumb%25255B2%25255D.png?imgmax=800" width="477" height="305"&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;But when I navigated to the specified install url I received 403 error This website requires you to login. After searching the web for a suitable answer I finally stumbled upon the answer on this web site:&lt;/p&gt; &lt;p&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-MY/winformssetup/thread/10ee1ca1-b3ae-4a6f-98ba-125179b9e417"&gt;http://social.msdn.microsoft.com/Forums/en-MY/winformssetup/thread/10ee1ca1-b3ae-4a6f-98ba-125179b9e417&lt;/a&gt;&lt;/p&gt; &lt;p&gt;In summary, don't forget to configure the .'vsto' MIME type with 'application/x-ms-vsto' on the virtual directory containing the add-in.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-2405265927752403907?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/JnlQ3izZqfA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/JnlQ3izZqfA/deploying-vsto-click-once-add-in-don.html</link><author>noreply@blogger.com (Richard Allen)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-KIAXwSw1rtU/TrgGOFX3buI/AAAAAAAABos/1yRaDhAbbyo/s72-c/image_thumb%25255B2%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://richallen.blogspot.com/2011/11/deploying-vsto-click-once-add-in-don.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-8649078469668035963</guid><pubDate>Wed, 05 Oct 2011 07:16:00 +0000</pubDate><atom:updated>2011-10-05T00:16:35.040-07:00</atom:updated><title>CodeKen - the replacement conference for StackOverflow DevDays</title><description>&lt;p&gt;CodeKen London 2011 is a brand new developer conference delivering two days of hands-on coding oriented content over the 14 - 15th November in London. The event was organised in response to the cancellation of the Stackoverflow DevDays conferences and includes many of the original speakers like Jon Skeet, Robert Pickering and Richard Marr. &lt;p&gt;The talks cover a wide range of subjects including programming style, MongoDB, NodeJS, HTML5, REST services and more. &lt;p&gt;In addition to an eclectic mix of talks CodeKen 2011 is launching a developer side project competition. The goal is to encourage and publicise developers that are spending their spare time working on interesting projects. Five finalists will be given a free ticket to the conference and a chance to present their project at the event. &lt;p&gt;See the full conference schedule and more information on the CodeKen Side Project competition on the conference site - &lt;a href="http://london2011.codeken.com/"&gt;http://london2011.codeken.com&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-8649078469668035963?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/GRpArrzTkDI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/GRpArrzTkDI/codeken-replacement-conference-for.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>0</thr:total><feedburner:origLink>http://richallen.blogspot.com/2011/10/codeken-replacement-conference-for.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-8896817380669159905</guid><pubDate>Mon, 05 Jul 2010 23:06:00 +0000</pubDate><atom:updated>2010-07-05T16:06:45.203-07:00</atom:updated><title>NxtGenUG Fest 10 - “Beside the C# side” – Bournemouth 16th July</title><description>&lt;p&gt;NxtGenUG are pleased to announce their annual conference Fest10 will be taking place on Bournemouth Pier this year on Friday the&amp;#160; 16&lt;sup&gt;th&lt;/sup&gt; July 2010 – It’s a great opportunity to take the family to the Seaside&amp;#160; for the weekend, and catch up on technology. The best thing is attendance to the conference is free to members and just £59.95 for non-members.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Speakers&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;We have a great speaker line up this year, Google’s Jon Skeet will be talking about C#, Microsoft’s Glenn Block is coming over from Redmond to talk about MEF, Ryan Simpson will be giving us the lowdown on F#. We’ll also be having NxtGenUG veterans Mike Taulty, on OData and Chris Hay on Azure, Plus Marcus Perryman will be talking about one of the hottest technologies this year Windows Phone 7.&lt;/p&gt;  &lt;p&gt;You can find a list of speakers and their sessions here&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.nxtgenug.net/fest10/Sessions.aspx"&gt;http://www.nxtgenug.net/fest10/Sessions.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To register simply go to the following link and follow the instructions on screen.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.nxtgenug.net/fest10"&gt;http://www.nxtgenug.net/fest10&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Parking, Hotels and Timings&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Upto date Details on parking, hotel accommodation and timings for the day can be found on the Fest10 site. The nearest parking for Bournemouth Pier is either in the Bournemouth International Centre (BIC - 20) car park, the Bournemouth Pavilion car parks (19/24) or the car park next to the Royal Bath hotel (18). However, there is also further car parking available at Eden Glen car park (21), Winter Gardens car park (22) and Beacon Road car park (25). For Hotels, the RusselCourt is where the evening entertainment will be Quote: NxtGenUG when booking, otherwise Bournemouth has a large amount of hotels, including the Best Western Hotel Royale.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.nxtgenug.net/fest10/"&gt;http://www.nxtgenug.net/fest10/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Geek Dinner&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;It's the Fest10 geek dinner - normal rules apply - pay for your own food/drink, and engage in great conversation, and eat fish and chips at Harry Ramsden’s. To register for the geek dinner&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.nxtgenug.net/ViewEvent.aspx?EventID=322"&gt;http://www.nxtgenug.net/ViewEvent.aspx?EventID=322&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Post Fest Party&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;We’ll also be having a post Fest Party at the RusselCourt Hotel – If you’ve brought your family down for the weekend feel free to bring them along. Just register on the site and drop us an email on how many people you’ll be bringing with you to&lt;a href="mailto:enquiries@nxtgenug.net"&gt;enquiries@nxtgenug.net&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.nxtgenug.net/ViewEvent.aspx?EventID=325"&gt;http://www.nxtgenug.net/ViewEvent.aspx?EventID=325&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Sponsorship&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;NxtGenUG would like to thank DevExpress, our gold sponsor, along with Microsoft, RedGate, PluralSight and Apress for their support in making this event possible.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-8896817380669159905?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/-8B0VTXehV8" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/-8B0VTXehV8/nxtgenug-fest-10-beside-c-side.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>0</thr:total><feedburner:origLink>http://richallen.blogspot.com/2010/07/nxtgenug-fest-10-beside-c-side.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-6195788832482033505</guid><pubDate>Mon, 02 Nov 2009 20:17:00 +0000</pubDate><atom:updated>2009-11-02T12:17:30.071-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Scrum</category><category domain="http://www.blogger.com/atom/ns#">Agile</category><title>CSM course in Bournemouth 23 &amp; 24 November</title><description>&lt;p&gt;Geoff Watts will be holding a CSM training course in Bournemouth on the 23/11/2009 and 24/11/2009. For full details see &lt;a href="http://bit.ly/1jeNo1"&gt;here&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-6195788832482033505?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/Gi9WBEHtqOs" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/Gi9WBEHtqOs/csm-course-in-bournemouth-23-24.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>1</thr:total><feedburner:origLink>http://richallen.blogspot.com/2009/11/csm-course-in-bournemouth-23-24.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-21513410344475695</guid><pubDate>Mon, 17 Aug 2009 21:50:00 +0000</pubDate><atom:updated>2009-08-17T14:50:52.773-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">ASP .NET</category><category domain="http://www.blogger.com/atom/ns#">NxtGenUG</category><category domain="http://www.blogger.com/atom/ns#">WatiN</category><title>An ASP .NET Testing Time Ahead</title><description>&lt;p&gt;Thursday 20th August sees NxtGenUG Southampton hosting a &lt;a href="http://www.nxtgenug.net/ViewEvent.aspx?EventID=233" target="_blank"&gt;web application testing session&lt;/a&gt; that is not to be missed. Testing guru and general all round community good guy &lt;a href="http://blog.benhall.me.uk/" target="_blank"&gt;Ben Hall&lt;/a&gt; is coming down to pay us a visit and talk about all things web test, Ben will be looking at how you can test different aspects of ASP .NET from the core engine to the UI and databases. Topics will include test driven development, mocking of external services as well as UI automation but probably most importantly Ben will be describing the best way to get started with testing you web application.&lt;/p&gt;  &lt;p&gt;All in all this looks like a great session and if you are in the area I would definitely recommend paying us a visit.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-21513410344475695?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/-J3AAUW2aOI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/-J3AAUW2aOI/asp-net-testing-time-ahead.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>0</thr:total><feedburner:origLink>http://richallen.blogspot.com/2009/08/asp-net-testing-time-ahead.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-2923988504680131802</guid><pubDate>Wed, 20 May 2009 19:38:00 +0000</pubDate><atom:updated>2009-05-20T12:38:02.761-07:00</atom:updated><title>Unit Testing ASP.NET? ASP.NET unit testing has never been this easy.</title><description>&lt;p&gt;   &lt;br /&gt;Typemock is launching a new product for ASP.NET developers – the &lt;strong&gt;ASP.NET Bundle&lt;/strong&gt; - and for the launch will be giving out &lt;strong&gt;FREE licenses&lt;/strong&gt; to bloggers and their readers.&lt;/p&gt;  &lt;p&gt;The ASP.NET Bundle is the ultimate ASP.NET unit testing solution, and offers both &lt;a href="http://www.typemock.com/"&gt;Typemock Isolator&lt;/a&gt;, a &lt;a href="http://www.typemock.com/"&gt;unit test&lt;/a&gt; tool and &lt;a href="http://sm-art.biz/Ivonna.aspx"&gt;Ivonna&lt;/a&gt;, the Isolator add-on for &lt;a href="http://sm-art.biz/Ivonna.aspx"&gt;ASP.NET unit testing&lt;/a&gt;, for a bargain price.     &lt;br /&gt;Typemock Isolator is a leading &lt;a href="http://www.typemock.com/"&gt;.NET unit testing&lt;/a&gt; tool (C# and VB.NET) for many ‘hard to test’ technologies such as &lt;a href="http://typemock.com/sharepointpage.php"&gt;SharePoint&lt;/a&gt;, &lt;a href="http://www.typemock.com/ASP.NET_unit_testing_page.php"&gt;ASP.NET&lt;/a&gt;, &lt;a href="http://www.typemock.com/ASP.NET_unit_testing_page.php"&gt;MVC&lt;/a&gt;, &lt;a href="http://www.typemock.com/wcfpage.php"&gt;WCF&lt;/a&gt;, WPF, &lt;a href="http://www.typemock.com/Silverlight_unit_testing_page.php"&gt;Silverlight&lt;/a&gt; and more. Note that for &lt;a href="http://www.typemock.com/Silverlight_unit_testing_page.php"&gt;unit testing Silverlight&lt;/a&gt; there is an open source Isolator add-on called &lt;a href="http://www.typemock.com/Silverlight_unit_testing_page.php"&gt;SilverUnit&lt;/a&gt;.     &lt;br /&gt;    &lt;br /&gt;The first 60 bloggers who will blog this text in their blog and &lt;a href="http://blog.typemock.com/2009/05/get-free-typemock-licenses-aspnet.html"&gt;tell us about it&lt;/a&gt;, will get a Free Isolator ASP.NET Bundle license (Typemock Isolator + Ivonna). If you post this in an ASP.NET &lt;strong&gt;dedicated&lt;/strong&gt; blog, you'll get a license automatically (even if more than 60 submit) during the first week of this announcement.     &lt;br /&gt;    &lt;br /&gt;Also 8 bloggers will get an &lt;strong&gt;additional 2 licenses&lt;/strong&gt; (each) to give away to their readers / friends.     &lt;br /&gt;Go ahead, click the following link for &lt;a href="http://blog.typemock.com/2009/05/get-free-typemock-licenses-aspnet.html"&gt;more information &lt;/a&gt;on how to get your free license.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-2923988504680131802?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/EmKw3C9nvuk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/EmKw3C9nvuk/unit-testing-aspnet-aspnet-unit-testing.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>0</thr:total><feedburner:origLink>http://richallen.blogspot.com/2009/05/unit-testing-aspnet-aspnet-unit-testing.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-7579775606521877425</guid><pubDate>Wed, 29 Apr 2009 15:36:00 +0000</pubDate><atom:updated>2009-04-29T08:36:05.822-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Unit Testing</category><category domain="http://www.blogger.com/atom/ns#">Linq to SQL</category><category domain="http://www.blogger.com/atom/ns#">CSLA</category><title>Using Linq to SQL to validate Data Access Logic</title><description>&lt;p&gt;So Microsoft aren't going to be supporting Linq to SQL (L2S) see &amp;quot;&lt;a href="http://ayende.com/Blog/archive/2008/10/31/microsoft-kills-linq-to-sql.aspx" target="_blank"&gt;Microsoft Kills Linq to SQL&lt;/a&gt;&amp;quot; for more info, but there are still some great situations that it can be really useful in your environment with it going into a production build and one of those is using L2S for testing your data access logic.&lt;/p&gt;  &lt;p&gt;This post aims to talk you through a way of using L2S to confirm that what you think your data access logic is doing is what your data access logic is actually doing.&lt;/p&gt;  &lt;p&gt;A really useful tool that comes with L2S is called SQLMetal, this tool is used to automatically generate a data context based on the current schema of a given database. So instead of using the fancy designer front end, you auto generate the whole database schema including Stored Procedures and Views if you want but you can restrict this if you want by simply not including the required input parameter. To do this every time your application builds simply amend your project file with the following ensuring that you replace the text in [] with your specific fields:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Target &lt;/span&gt;&lt;span style="color: red"&gt;Name&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;BeforeBuild&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Exec &lt;/span&gt;&lt;span style="color: red"&gt;Command&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: red"&gt;&amp;amp;quot;&lt;/span&gt;&lt;span style="color: blue"&gt;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\SqlMetal.exe&lt;/span&gt;&lt;span style="color: red"&gt;&amp;amp;quot;  &lt;/span&gt;&lt;span style="color: blue"&gt;/server:[ServerName] /Database:[DatabaseName] /code:[MyDataContext].cs /context:[MyDataContext] /namespace:[MyCompany].[MyProject].DataAccess /views /sprocs /functions /pluralize &lt;/span&gt; &lt;span style="color: red"&gt;WorkingDirectory&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;$(ProjectDir)&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;&lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Target&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The parameters /views /sprocs /functions will expose all of the views, stored procedures and functions accordingly. The /pluralize parameter indicates that you want to generate plural names for tables so a table called &amp;quot;Customer&amp;quot; will be exposed as &amp;quot;Customers&amp;quot; in the data context. For full details of the parameter list go &lt;a href="http://msdn.microsoft.com/en-us/library/bb386987.aspx" target="_blank"&gt;here&lt;/a&gt;. Once you've modified the project file reload it and when you next build the project file it will generate a data context for you with as much of your database exposed as you would like.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;So now that we have our data context we can put this to good effect when testing our database access logic, for example take the following data portal insert method from a CSLA business object which will be called when our business object is new and the Save method is called:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;protected override void &lt;/span&gt;DataPortal_Insert()&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: blue"&gt;var &lt;/span&gt;connection = &lt;span style="color: #2b91af"&gt;ConnectionManager&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;SqlConnection&lt;/span&gt;&amp;gt;.GetManager(&lt;span style="color: #a31515"&gt;&amp;quot;MyDatabase&amp;quot;&lt;/span&gt;).Connection)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #2b91af"&gt;SqlCommand &lt;/span&gt;cmd = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SqlCommand&lt;/span&gt;();&lt;br /&gt;        cmd.CommandType = &lt;span style="color: #2b91af"&gt;CommandType&lt;/span&gt;.StoredProcedure;&lt;br /&gt;        cmd.Connection = connection;&lt;br /&gt;        cmd.CommandText = &lt;span style="color: #a31515"&gt;&amp;quot;usp_CreateEmployee&amp;quot;&lt;/span&gt;;&lt;br /&gt;        cmd.Parameters.AddWithValue(&lt;span style="color: #a31515"&gt;&amp;quot;@FirstName&amp;quot;&lt;/span&gt;, ReadProperty(FirstNameProperty));&lt;br /&gt;        cmd.Parameters.AddWithValue(&lt;span style="color: #a31515"&gt;&amp;quot;@LastName&amp;quot;&lt;/span&gt;, ReadProperty(LastNameProperty));&lt;br /&gt;        cmd.Parameters.AddWithValue(&lt;span style="color: #a31515"&gt;&amp;quot;@EmailAddress&amp;quot;&lt;/span&gt;, ReadProperty(EmailAddressProperty));&lt;br /&gt;        cmd.ExecuteNonQuery();&lt;br /&gt;    }&lt;br /&gt;} &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This method quite simply executes a stored procedure called &amp;quot;usp_CreateEmployee&amp;quot; and passes in the parameters from the business object. What we want to do here is validate that the parameters are correctly passed from our business object into our stored procedure and the stored procedure correctly performs an operation to insert a new employee with the details set on the business object. What we don't want to do here is have to write a whole bunch of code in order to do this, step in L2S.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;So now back in our unit test we can do the following:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;        [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]&lt;br /&gt;        &lt;span style="color: blue"&gt;public void &lt;/span&gt;EmployeeIsCreatedInDatabase()&lt;br /&gt;        {&lt;br /&gt;            TestDataContext = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;MyTestDataContext&lt;/span&gt;(CreateConnection());&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue"&gt;int &lt;/span&gt;initialCount = TestDataContext.Employees.Count();&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue"&gt;const string &lt;/span&gt;FirstName = &lt;span style="color: #a31515"&gt;&amp;quot;TestFirstName&amp;quot;&lt;/span&gt;;&lt;br /&gt;            &lt;span style="color: blue"&gt;const string &lt;/span&gt;LastName = &lt;span style="color: #a31515"&gt;&amp;quot;TestLastName&amp;quot;&lt;/span&gt;;&lt;br /&gt;            &lt;span style="color: blue"&gt;const string &lt;/span&gt;EmailAddress = &lt;span style="color: #a31515"&gt;&amp;quot;test@test.com&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: green"&gt;// Create business object and set values&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: blue"&gt;var &lt;/span&gt;employee = &lt;span style="color: #2b91af"&gt;Employee&lt;/span&gt;.NewEmployee(CompanyId);&lt;br /&gt;            employee.FirstName = FirstName;&lt;br /&gt;            employee.LastName = LastName;&lt;br /&gt;            employee.EmailAddress = EmailAddress;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: green"&gt;// Call save on business object, this will execute data portal logic &lt;br /&gt;            // and insert a new row in the database with the new values&lt;br /&gt;            &lt;/span&gt;employee.Save();&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: green"&gt;// Refresh our data context with data from the database&lt;br /&gt;            &lt;/span&gt;TestDataContext.Refresh(&lt;span style="color: #2b91af"&gt;RefreshMode&lt;/span&gt;.OverwriteCurrentValues);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: green"&gt;// Now get the new employee table count and assert it has increased by 1&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: blue"&gt;int &lt;/span&gt;newCount = TestDataContext.Employees.Count();&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(initialCount + 1, newCount);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: green"&gt;// Now get a Linq Employee object directly from the data context and verify that&lt;br /&gt;            // the all of the fields have been populated as we expected them to.&lt;br /&gt;            &lt;/span&gt;&lt;span style="color: #2b91af"&gt;LinqEmployee &lt;/span&gt;linqEmployee = TestDataContext.Employees.OrderByDescending(e =&amp;gt; e.ID).FirstOrDefault();&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.IsNotNull(linqEmployee);&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(linqEmployee.FirstName, FirstName, &lt;span style="color: #a31515"&gt;&amp;quot;Expected first names to match&amp;quot;&lt;/span&gt;);&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(linqEmployee.LastName, LastName, &lt;span style="color: #a31515"&gt;&amp;quot;Expected last names to match&amp;quot;&lt;/span&gt;);&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(linqEmployee.Email, EmailAddress, &lt;span style="color: #a31515"&gt;&amp;quot;Expected email addresses to match&amp;quot;&lt;/span&gt;);&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;As you can see from the above code, the test creates a TestDataContext L2S object&amp;#160; and takes an initial count of the number of employees in the Employee table and defines our test values as constants.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Next we create a new employee business object and set the appropriate values with the test data. We then call the Save method on the business object, this is the method we are actually testing and we want to ensure that it correctly passes the information set on the business object down to our data access layer and then the data access layer inserts the appropriate data into the relevant tables.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;We can then verify that the Save method has done what it needed to do by using out TestDataContext, we simply refresh the data with values from the database and then perform some assertions. Firstly, we check that the employee count has incremented by 1, this ensures that an insert was performed on the table. Next, we sort the employees by Id and order descending ensuring that we get the latest Id generated by the table - our new employee should be the last row in the table (unfortunately the Last() function in L2S does not work so we have to do this order by descending approach). We then get an instance of this L2S object and perform assertions on its properties ensuring that the data we set on our business object has been set on the L2S object.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Linq to SQL may no longer be supported by Microsoft and as such might not be suitable for production ready systems, but it can still be a really useful tool especially when performing data tests to ensure our data access layers are performing as we expect. I hope you find this post useful and it helps you to get a bit more data access testing done. Let me know your comments.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-7579775606521877425?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/3trFMeTdLcE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/3trFMeTdLcE/using-linq-to-sql-to-validate-data.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>0</thr:total><feedburner:origLink>http://richallen.blogspot.com/2009/04/using-linq-to-sql-to-validate-data.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-5850688588456457736</guid><pubDate>Tue, 28 Apr 2009 14:51:00 +0000</pubDate><atom:updated>2009-04-28T07:51:07.472-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Unit Testing</category><category domain="http://www.blogger.com/atom/ns#">CSLA</category><category domain="http://www.blogger.com/atom/ns#">TypeMock</category><title>Unit Testing CSLA with Type Mock Isolator</title><description>&lt;p&gt;I am a huge fan of &lt;a href="www.lhotka.net/cslanet" target="_blank"&gt;CSLA&lt;/a&gt; and look to try and use it in projects where ever I can as it just makes life so much simpler by taking some of the major decision points out of the development cycle allowing you to focus on the real problem which is defining and designing your business logic layer for what ever project you are working on.&lt;/p&gt;  &lt;p&gt;As with any framework, CSLA has its benefits and it has its drawbacks, I am not going to go into all these in this post as there are plenty of people that have already had these discussions already but one of the major drawbacks I found was when trying to unit test my CSLA objects.&lt;/p&gt;  &lt;p&gt;In a nutshell your CSLA based business objects inherit from a base class called BusinessBase&amp;lt;T&amp;gt;, this class implements a whole bunch of useful features such as authorisation rule checking, validation rule checking, n-level undo, distributed business objects via the data portal etc that can be utilised by any inheriting class. &lt;/p&gt;  &lt;p&gt;Probably the key area is the Data Portal mechanism which performs the following (please note this is over simplified for clarity) when the Save() method is called on your business class:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Determine the state of your class, is it Valid (all data is correct) and Dirty (some data has changed)&lt;/li&gt;    &lt;li&gt;Determine what kind of operation to perform (If the object is new then Insert else Update etc)&lt;/li&gt;    &lt;li&gt;Serializing your business object&lt;/li&gt;    &lt;li&gt;Transport the business object to your data access layer (which could be across a server boundary) &lt;/li&gt;    &lt;li&gt;De-serializing the business object&lt;/li&gt;    &lt;li&gt;Executing any required data access logic i.e. Insert, Update, Fetch operations&lt;/li&gt;    &lt;li&gt;Perform any validation rules required&lt;/li&gt;    &lt;li&gt;Serialize the object again&lt;/li&gt;    &lt;li&gt;Transport the business object back to the application layer (which could be across a server boundary) &lt;/li&gt;    &lt;li&gt;De-serializing the business object&lt;/li&gt;    &lt;li&gt;Return a new instance of the application logic&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;As you can see CSLA does a lot of work under the hood which involves a lot (and I do mean a lot) of reflection which is all good for making your life as a developer great when developing the business domain but this becomes a problem when coming to unit test and mock out parts of the system.&lt;/p&gt;  &lt;p&gt;CSLA encapsulates the data access logic methods i.e. DataPortal_XYZ within the business object, which is probably its most controversial point, but this does not restrict your choice of the actual data access mechanism that you want to use, I personally am using Linq to SQL as my data access layer and find that it is extremely quick and easy to: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Add new columns to the database&lt;/li&gt;    &lt;li&gt;Expose them via Linq to SQL&lt;/li&gt;    &lt;li&gt;Expose them in the business object&lt;/li&gt;    &lt;li&gt;Add any validation rules in the business object &lt;/li&gt;    &lt;li&gt;Put a field on the UI&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;That said, any other type of data access could easily used instead such as Linq to Entities, NHibernate, ADO .NET etc etc.&lt;/p&gt;  &lt;p&gt;So hopefully you are starting to see the problem we might have with unit testing, essentially as soon as you perform an action on an object such as set a property, CLSA will perform some behind the scenes work to execute authorisation and validation rules to determine whether the current user is permitted to perform the action and then determine whether the property is valid after its value has been set. It is this &amp;quot;behind the scenes&amp;quot; work that is absolutely awesome and makes CSLA a great framework but makes the mocking and unit testing almost impossible as it becomes very difficult to isolate the various parts of the business object.&lt;/p&gt;  &lt;p&gt;I have been working Rhino Mocks for a while and found that this has been great especially when compared to NMock but when I tried mocking a CSLA object it let me down. It seems that the problem is that Rhino Mocks relies on &lt;a href="http://www.martinfowler.com/articles/injection.html" target="_blank"&gt;Dependency Injection&lt;/a&gt; to perform its mocking and because CSLA objects are generally closed and do not expose ways of injecting mocks into the objects it is impossible to replace the data access logic with a mock replacement - or so I thought until I came across &lt;a href="http://www.typemock.com/index.php" target="_blank"&gt;TypeMock&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.typemock.com/Downloads.php" target="_blank"&gt;TypeMock Isolater&lt;/a&gt; uses Aspect Oriented Programming to create a mock aspect, it essentially monitors the applications execution and registers an interest in specific methods on an object with the .NET framework API, when the method is called the .NET framework notifies the TypeMock and allows it to return mocked objects or values. What this means is that we don't need to change our objects and sacrifice our &amp;quot;good OO design&amp;quot; in order to perform unit testing of our objects.&lt;/p&gt;  &lt;p&gt;Here is a very simple example of how I have used Type Mock to fake a couple of child objects that exist on my Employee class, I want to test the validation rules on the Employee object but I do not want to have to load or create a new instance of either Workgroup or Role properties so I simply create a &amp;quot;fake&amp;quot; instance using the Isolate class:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;        private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Employee &lt;/span&gt;CreateEmployee()&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;var &lt;/span&gt;employee = &lt;span style="color: #2b91af"&gt;Employee&lt;/span&gt;.NewEmployee(CompanyId);&lt;br /&gt;            employee.FirstName = &lt;span style="color: #a31515"&gt;&amp;quot;Test&amp;quot;&lt;/span&gt;;&lt;br /&gt;            employee.LastName = &lt;span style="color: #a31515"&gt;&amp;quot;Employee&amp;quot;&lt;/span&gt;;&lt;br /&gt;            employee.EmailAddress = &lt;span style="color: #a31515"&gt;&amp;quot;test.employee@testcompany.com&amp;quot;&lt;/span&gt;;&lt;br /&gt;            employee.Workgroup = &lt;span style="color: #2b91af"&gt;Isolate&lt;/span&gt;.Fake.Instance&amp;lt;&lt;span style="color: #2b91af"&gt;Workgroup&lt;/span&gt;&amp;gt;();&lt;br /&gt;            employee.Role = &lt;span style="color: #2b91af"&gt;Isolate&lt;/span&gt;.Fake.Instance&amp;lt;&lt;span style="color: #2b91af"&gt;Role&lt;/span&gt;&amp;gt;();&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;employee;&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now my Employee class has all of its properties set (two of them with fake objects) and therefore will be valid, I can independently test each validation rule to ensure that they are fired correctly when the relevant property on the object changes, in the following case I ensure that the &amp;quot;Email address is required&amp;quot; rule is fired:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;        [&lt;span style="color: #2b91af"&gt;TestMethod&lt;/span&gt;]&lt;br /&gt;        &lt;span style="color: blue"&gt;public void &lt;/span&gt;EmailAddressIsRequired()&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;var &lt;/span&gt;employee = CreateEmployee();&lt;br /&gt;            employee.EmailAddress = &lt;span style="color: blue"&gt;null&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.AreEqual(1, employee.BrokenRulesCollection.Count());&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.IsTrue(employee.BrokenRulesCollection[0].Property == &lt;span style="color: #a31515"&gt;&amp;quot;EmailAddress&amp;quot;&lt;/span&gt;);&lt;br /&gt;            &lt;span style="color: #2b91af"&gt;Assert&lt;/span&gt;.IsFalse(employee.IsValid);&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now admittedly I could have achieved the same thing here using Rhino Mocks and creating a mock instance of each of the classes, but lets say for example the Employee object has a custom validation method that using a command object to determine whether an employee with the same email address already exists, the command object might look something like this:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;        class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;EmployeeExistsCommand &lt;/span&gt;: &lt;span style="color: #2b91af"&gt;CommandBase&lt;br /&gt;        &lt;/span&gt;{&lt;br /&gt;            &lt;span style="color: blue"&gt;public bool &lt;/span&gt;EmployeeExists { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;            &lt;span style="color: blue"&gt;public string &lt;/span&gt;EmailAddress { &lt;span style="color: blue"&gt;get&lt;/span&gt;; &lt;span style="color: blue"&gt;set&lt;/span&gt;; }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue"&gt;private &lt;/span&gt;EmployeeExistsCommand(&lt;span style="color: blue"&gt;string &lt;/span&gt;emailAddress)&lt;br /&gt;            {&lt;br /&gt;                EmailAddress = emailAddress;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue"&gt;public static bool &lt;/span&gt;CheckIfEmployeeExists(&lt;span style="color: blue"&gt;string &lt;/span&gt;emailAddress)&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: blue"&gt;var &lt;/span&gt;cmd = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;EmployeeExistsCommand&lt;/span&gt;(emailAddress);&lt;br /&gt;                cmd = &lt;span style="color: #2b91af"&gt;DataPortal&lt;/span&gt;.Execute(cmd);&lt;br /&gt;                &lt;span style="color: blue"&gt;return &lt;/span&gt;cmd.EmployeeExists;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue"&gt;protected override void &lt;/span&gt;DataPortal_Execute()&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: blue"&gt;using &lt;/span&gt;(&lt;span style="color: blue"&gt;var &lt;/span&gt;ctx = Csla.Data.&lt;span style="color: #2b91af"&gt;ContextManager&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af"&gt;HolidayPlanrDataContext&lt;/span&gt;&amp;gt;.GetManager(HolidayPlanr.DataAccess.&lt;span style="color: #2b91af"&gt;Database&lt;/span&gt;.HolidayPlanrDb))&lt;br /&gt;                {&lt;br /&gt;                    &lt;span style="color: blue"&gt;var &lt;/span&gt;data = &lt;span style="color: blue"&gt;from &lt;/span&gt;e &lt;span style="color: blue"&gt;in &lt;/span&gt;ctx.DataContext.Employees&lt;br /&gt;                               &lt;span style="color: blue"&gt;where &lt;/span&gt;e.Email == EmailAddress&lt;br /&gt;                               &lt;span style="color: blue"&gt;select &lt;/span&gt;e;&lt;br /&gt;&lt;br /&gt;                    EmployeeExists = data.SingleOrDefault() != &lt;span style="color: blue"&gt;null&lt;/span&gt;;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The main thing to note here is that this command makes a trip to the database via Linq to SQL in order to determine whether an employee with the same email address already exists. If we add a custom validation rule to our Employee class to execute this command like so...&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;protected override void &lt;/span&gt;AddBusinessRules()&lt;br /&gt;{&lt;br /&gt;    ValidationRules.AddRule(&lt;span style="color: #2b91af"&gt;CommonRules&lt;/span&gt;.StringRequired, FirstNameProperty);&lt;br /&gt;    ValidationRules.AddRule(&lt;span style="color: #2b91af"&gt;CommonRules&lt;/span&gt;.StringRequired, LastNameProperty);&lt;br /&gt;    ValidationRules.AddRule(&lt;span style="color: #2b91af"&gt;CommonRules&lt;/span&gt;.RegExMatch, &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;CommonRules&lt;/span&gt;.&lt;span style="color: #2b91af"&gt;RegExRuleArgs&lt;/span&gt;(EmailAddressProperty, &lt;span style="color: #a31515"&gt;@&amp;quot;\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*&amp;quot;&lt;/span&gt;));&lt;br /&gt;    ValidationRules.AddRule(&lt;span style="color: #2b91af"&gt;Rules&lt;/span&gt;.ObjectRequired, FirstNameProperty);&lt;br /&gt;    ValidationRules.AddRule(&lt;span style="color: #2b91af"&gt;Rules&lt;/span&gt;.ObjectRequired, LastNameProperty);&lt;br /&gt;    ValidationRules.AddRule(&lt;span style="color: #2b91af"&gt;Rules&lt;/span&gt;.ObjectRequired, EmailAddressProperty);&lt;br /&gt;    ValidationRules.AddRule(&lt;span style="color: #2b91af"&gt;Rules&lt;/span&gt;.ObjectRequired, RoleProperty);&lt;br /&gt;    ValidationRules.AddRule(&lt;span style="color: #2b91af"&gt;Rules&lt;/span&gt;.ObjectRequired, WorkgroupProperty);&lt;br /&gt;    &lt;strong&gt;ValidationRules.AddRule(EmployeeAlreadyExists, EmailAddressProperty);&lt;/strong&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And the static method that implements the logic looks like this:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;        private static bool &lt;/span&gt;EmployeeAlreadyExists(&lt;span style="color: blue"&gt;object &lt;/span&gt;target, &lt;span style="color: #2b91af"&gt;RuleArgs &lt;/span&gt;args)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;if &lt;/span&gt;(target &lt;span style="color: blue"&gt;is &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Employee&lt;/span&gt;)&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: blue"&gt;var &lt;/span&gt;employee = target &lt;span style="color: blue"&gt;as &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Employee&lt;/span&gt;;&lt;br /&gt;                &lt;span style="color: blue"&gt;if &lt;/span&gt;(employee.IsNew)&lt;br /&gt;                {&lt;br /&gt;                    &lt;span style="color: blue"&gt;if &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;EmployeeExistsCommand&lt;/span&gt;.CheckIfEmployeeExists(employee.EmailAddress))&lt;br /&gt;                    {&lt;br /&gt;                        args.Description = &lt;span style="color: blue"&gt;string&lt;/span&gt;.Format(&lt;span style="color: #a31515"&gt;&amp;quot;An employee already exists with email address {0}&amp;quot;&lt;/span&gt;, employee.EmailAddress);&lt;br /&gt;                        &lt;span style="color: blue"&gt;return false&lt;/span&gt;;&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            &lt;span style="color: blue"&gt;return true&lt;/span&gt;;&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Now when we run our unit tests the creation of our Employee object will execute the validation rules and therefore call the static method and make a call to the database to determine whether the employee already exists which is what we don't want to happen because now this rule will fire for all of my other tests.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This is, as I see it, where the power of Type Mock Isolator comes in, what I can do now is define an Isolate command to intercept any calls to the EmployeeAlreadyExists method and simply return the validation result I want. So I can do this by declaring the following in my CreateEmployee method:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;private &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Employee &lt;/span&gt;CreateEmployee()&lt;br /&gt;{&lt;br /&gt;&lt;strong&gt;&lt;em&gt;    &lt;span style="color: #2b91af"&gt;Isolate&lt;/span&gt;.NonPublic.WhenCalled(&lt;span style="color: blue"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Employee&lt;/span&gt;), &lt;span style="color: #a31515"&gt;&amp;quot;EmployeeAlreadyExists&amp;quot;&lt;/span&gt;).WillReturn(&lt;span style="color: blue"&gt;true&lt;/span&gt;);&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: blue"&gt;var &lt;/span&gt;employee = &lt;span style="color: #2b91af"&gt;Employee&lt;/span&gt;.NewEmployee(CompanyId);&lt;br /&gt;    employee.FirstName = &lt;span style="color: #a31515"&gt;&amp;quot;Test&amp;quot;&lt;/span&gt;;&lt;br /&gt;    employee.LastName = &lt;span style="color: #a31515"&gt;&amp;quot;Employee&amp;quot;&lt;/span&gt;;&lt;br /&gt;    employee.EmailAddress = &lt;span style="color: #a31515"&gt;&amp;quot;test.employee@testcompany.com&amp;quot;&lt;/span&gt;;&lt;br /&gt;    employee.Workgroup = &lt;span style="color: #2b91af"&gt;Isolate&lt;/span&gt;.Fake.Instance&amp;lt;&lt;span style="color: #2b91af"&gt;Workgroup&lt;/span&gt;&amp;gt;(&lt;span style="color: #2b91af"&gt;Members&lt;/span&gt;.CallOriginal);&lt;br /&gt;    employee.Role = &lt;span style="color: #2b91af"&gt;Isolate&lt;/span&gt;.Fake.Instance&amp;lt;&lt;span style="color: #2b91af"&gt;Role&lt;/span&gt;&amp;gt;(&lt;span style="color: #2b91af"&gt;Members&lt;/span&gt;.CallOriginal);&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;    &lt;span style="color: #2b91af"&gt;Isolate&lt;/span&gt;.Verify.NonPublic.WasCalled(&lt;span style="color: blue"&gt;typeof &lt;/span&gt;(&lt;span style="color: #2b91af"&gt;Employee&lt;/span&gt;), &lt;span style="color: #a31515"&gt;&amp;quot;EmployeeAlreadyExists&amp;quot;&lt;/span&gt;);&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue"&gt;return &lt;/span&gt;employee;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;So now prior to creating a new instance of the Employee object I define an isolation of a non-public method called &amp;quot;EmployeeAlreadyExists&amp;quot; on the class Employee and set its return value to &amp;quot;true&amp;quot; ensuring that by default this validation rule will always be true allowing me to continue and isolate my other validation rules.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The second statement I added was just a verify statement which ensures that a call was actually made to the &amp;quot;EmployeeAlreadyExists&amp;quot; command, so this lets me know if there was a problem in the actual call to the method.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Type Mock Isolator allows areas of a system that were previously un-testable/mockable to now be tested and mocked in a nice and easy to understand way, I like it very much because it now gives me the ability to write some much more in depth CSLA unit tests without breaking my OO design.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;It is very powerful and could easily be mis-used or over-used but with benefits of increasing general unit test coverage it is probably worth it.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;One major drawback is the lack of a community edition, the product comes with a 21 day enterprise license that reverts to the free features after the trial period. The single user license priced at 89 euros which I suppose could be well worth the price considering the peace of mind that could be achieved after unit testing those hard to reach places - all in all I like it and would recommend others at least give it a try.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-5850688588456457736?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/gRPpz3pUV0o" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/gRPpz3pUV0o/unit-testing-csla-with-type-mock.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>6</thr:total><feedburner:origLink>http://richallen.blogspot.com/2009/04/unit-testing-csla-with-type-mock.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-1010063652737058173</guid><pubDate>Tue, 28 Apr 2009 07:08:00 +0000</pubDate><atom:updated>2009-04-28T00:08:52.475-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Scrum</category><category domain="http://www.blogger.com/atom/ns#">Agile</category><category domain="http://www.blogger.com/atom/ns#">UKSSUG</category><category domain="http://www.blogger.com/atom/ns#">Twitter</category><title>UK South Scrum User Group (UKSSUG)</title><description>&lt;p&gt;It's been a while since I last blogged, can't really think of a decent reason apart this thing called Twitter taking up a fair bit of time recently, I've not been twittering myself all that much but doing lots of reading of tweeple's tweets in the twittersphere.&lt;/p&gt;  &lt;p&gt;Anyway, with that out of the way, last night I went to the second meeting of the &lt;a href="http://www.linkedin.com/groups?gid=1802122" target="_blank"&gt;UK South Scrum User Group&lt;/a&gt; to talk about &amp;quot;The Definition of Done&amp;quot;, something that seems to plaque the majority of people developing software. &lt;/p&gt;  &lt;p&gt;It was a great evening lead by &lt;a href="http://www.linkedin.com/profile?viewProfile=&amp;amp;key=9421956&amp;amp;authToken=jy8f&amp;amp;authType=name&amp;amp;trk=anetppl_profil&amp;amp;goback=%2Eanp_1802122_1240902103873_1" target="_blank"&gt;Mike Williams&lt;/a&gt;, we discussed the various stages of &amp;quot;done&amp;quot; including Tasks, User Stories, Iterations and Releases and everybody suggested ways in which it is possible to define &amp;quot;done&amp;quot; and talked about ways in which any problems we were facing could be addressed.&lt;/p&gt;  &lt;p&gt;All in all a great second night of the user group, its great to be apart of a group that I am not running so that I can actually participate rather than constantly trying to organise the next thing for NxtGenUG. If you fancy coming along to &lt;a href="http://www.linkedin.com/groups?gid=1802122" target="_blank"&gt;UKSSUG&lt;/a&gt;, it's an open invite and totally free, keep an eye on the linked in group and we'll get the next meeting date posted up soon.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-1010063652737058173?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/EnS8gFKoh2U" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/EnS8gFKoh2U/uk-south-scrum-user-group-ukssug.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>0</thr:total><feedburner:origLink>http://richallen.blogspot.com/2009/04/uk-south-scrum-user-group-ukssug.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-7121199782465191656</guid><pubDate>Tue, 31 Mar 2009 12:47:00 +0000</pubDate><atom:updated>2009-03-31T05:47:46.146-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Scrum</category><category domain="http://www.blogger.com/atom/ns#">Agile</category><title>New South Coast Scrum User Group</title><description>&lt;p&gt;The South Coast now has a new user group for all those interested in Scrum and anything Agile. &lt;a href="http://maps.google.co.uk/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=BH24+1EY&amp;amp;sll=50.844633,-1.772254&amp;amp;sspn=0.011286,0.027895&amp;amp;ie=UTF8&amp;amp;ll=50.846056,-1.787896&amp;amp;spn=0.011286,0.027895&amp;amp;t=h&amp;amp;z=16&amp;amp;iwloc=addr " target="_blank"&gt;Plamen Balkanski&lt;/a&gt; and a couple of other Agile enthusiasts have setup this user group to help spread the word of Scrum within the local area, anyone is welcome whether you are new to Agile or an experienced Scrum Master. &lt;/p&gt;  &lt;p&gt;The next session will be on 27th April and the topic is &amp;quot;Getting acceptable definition of done&amp;quot; - which seems to be a bit of a classic Agile development issue.&amp;#160; &lt;br /&gt;    &lt;br /&gt;The meeting starts at 19:00 and will continue until 21:00 and can be found at:&lt;/p&gt;  &lt;p&gt;The Inn on the Furlong   &lt;br /&gt;Meeting House Lane     &lt;br /&gt;Ringwood     &lt;br /&gt;Hampshire     &lt;br /&gt;BH24 1EY&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.ringwoodbrewery.co.uk/iof.htm"&gt;http://www.ringwoodbrewery.co.uk/iof.htm&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To register for the event go to: &lt;a href="http://ukssug.eventbrite.com" target="_blank"&gt;http://ukssug.eventbrite.com&lt;/a&gt; , it's free but this is necessary so we know how many people are going to attend. You can also join the LinkedIn group &lt;a href="http://www.linkedin.com/groups?home=&amp;amp;gid=1802122&amp;amp;trk=anet_ug_hm&amp;amp;goback=%2Eanh_1802122%2Eana_1802122_1238502666254_3_1" target="_blank"&gt;here&lt;/a&gt;, where you will find discussions, notes and links with details from previous meetings.&lt;/p&gt;  &lt;p&gt;Look forward to seeing you there.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-7121199782465191656?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/uOazViGTZzo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/uOazViGTZzo/new-south-coast-scrum-user-group.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>0</thr:total><feedburner:origLink>http://richallen.blogspot.com/2009/03/new-south-coast-scrum-user-group.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-2099721757538552434</guid><pubDate>Fri, 06 Feb 2009 12:07:00 +0000</pubDate><atom:updated>2009-02-06T04:07:53.277-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Twitter</category><title>I am on Twitter</title><description>&lt;p&gt;For anyone interested, I am now on Twitter: &lt;a href="http://www.twitter.com/rich_allen"&gt;http://www.twitter.com/rich_allen&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-2099721757538552434?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/K2bPGeCtb8Q" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/K2bPGeCtb8Q/i-am-on-twitter.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>0</thr:total><feedburner:origLink>http://richallen.blogspot.com/2009/02/i-am-on-twitter.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-5991024680918247271</guid><pubDate>Fri, 06 Feb 2009 11:59:00 +0000</pubDate><atom:updated>2009-02-06T03:59:17.626-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tortoise</category><category domain="http://www.blogger.com/atom/ns#">SVN</category><category domain="http://www.blogger.com/atom/ns#">Performance</category><title>Subtle changes to Tortoise SVN increase machine performance</title><description>&lt;p&gt;For the last I don't know how long, I've been complaining about the speed of my work desktop machine. It's a dual-core with 2GB RAM running XP but it runs like an absolute pig. A colleague of mine recently did some digging and found that unless you make some subtle changes to Tortoise SVN it does quite a bit of unnecessary work in the background.&lt;/p&gt;  &lt;p&gt;Quote from colleague:&lt;/p&gt;  &lt;p&gt;&amp;quot;I think a significant factor in our machines being slow is Tortoise performance as it is monitoring and caching all file modifications (it is the biggest user of CPU time on my box).&lt;/p&gt;  &lt;p&gt;This article makes some recommendations - &lt;a href="http://tortoisesvn.net/node/267"&gt;http://tortoisesvn.net/node/267&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I&amp;#8217;ve followed a couple and it seems to have made some difference:&lt;/p&gt;  &lt;p&gt;1. Right Click-&amp;gt;Tortoise-&amp;gt;Settings &amp;#8211; Icon Overlays Tab&lt;/p&gt;  &lt;p&gt;Add excludes to all drives.&lt;/p&gt;  &lt;p&gt;Add an include to your working directory only.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_YMBZZg-03bE/SYwmD6s7NVI/AAAAAAAAAMY/Eg5DO6k_yt0/s1600-h/clip_image002%5B6%5D.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="278" alt="clip_image002" src="http://lh5.ggpht.com/_YMBZZg-03bE/SYwmEOqAtPI/AAAAAAAAAMc/kr9mX-ERN5M/clip_image002_thumb%5B1%5D.jpg?imgmax=800" width="396" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;2. Remove all currently unused source directories - &amp;gt; I have removed the branches etc and only have MF and MIS trunk checked out for instance.&amp;quot;&lt;/p&gt;  &lt;p&gt;Also, doing the following can help if you don't mind losing the pretty overlay icons on some of your files:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_YMBZZg-03bE/SYwmExmuObI/AAAAAAAAAMg/tU5tk_ohqK4/s1600-h/clip_image002%5B4%5D%5B3%5D.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="282" alt="clip_image002[4]" src="http://lh4.ggpht.com/_YMBZZg-03bE/SYwmFACnouI/AAAAAAAAAMk/QJ0kJwrfVnI/clip_image002%5B4%5D_thumb%5B1%5D.jpg?imgmax=800" width="401" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Select status cache = none.&lt;/p&gt;  &lt;p&gt;This means you lose having meaningful icons on the your source folders, but the rest of tortoise works &amp;#8211; commit/update/get modifications etc.&lt;/p&gt;  &lt;p&gt;I can live without the icons&amp;#8230;.&lt;/p&gt;  &lt;p&gt;Since making these changes I have seen a marked difference in how my machine responds...hooray!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-5991024680918247271?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/r8yWBMUcCvY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/r8yWBMUcCvY/subtle-changes-to-tortoise-svn-increase.html</link><author>noreply@blogger.com (Richard Allen)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/_YMBZZg-03bE/SYwmEOqAtPI/AAAAAAAAAMc/kr9mX-ERN5M/s72-c/clip_image002_thumb%5B1%5D.jpg?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://richallen.blogspot.com/2009/02/subtle-changes-to-tortoise-svn-increase.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-2483745446106255668</guid><pubDate>Thu, 08 Jan 2009 11:22:00 +0000</pubDate><atom:updated>2009-01-08T03:28:50.773-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Charity</category><category domain="http://www.blogger.com/atom/ns#">British Heart Foundation</category><category domain="http://www.blogger.com/atom/ns#">10Km Run</category><title>BHF - Bournemouth Bay 10K Run 2009</title><description>&lt;p&gt;Now I am a little confused as to how I have actually got myself into this but in the whirl wind return to work after a great Christmas and New Year, a colleague at Fitness First decided to send a link around and say that he was taking part in the &lt;a href="http://www.bhf.org.uk/get_involved/take_part_in_our_events/event_finder/view_event.aspx?ps=1000286  " target="_blank"&gt;Bournemouth Bay 10K Run for the British Heart Foundation&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Before I knew it a couple of other colleagues had signed up to it and I compulsively found myself stating something like &amp;quot;...yeah sounds good to me, where to I sign...&amp;quot;. So I am firmly signed up to this huge challenge (I am a software developer not a road runner by any means) and so the training has started and the plea for aid and donations has begun.&lt;/p&gt;  &lt;p&gt;I've not really done anything like this before but if anybody is interested in helping me raise money for the &lt;a href="http://www.bhf.org.uk" target="_blank"&gt;British Heart Foundation&lt;/a&gt; or simply wants to be bet that I cannot do it (should encourage me some more), then please feel free to pop along to &lt;a href="http://www.bhf.org.uk" target="_blank"&gt;My Fundraising Page&lt;/a&gt; or use the widget in the side bar and donate as much as you can afford.&lt;/p&gt;  &lt;p&gt;Many thanks&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-2483745446106255668?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/7AOJnS9Vvmk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/7AOJnS9Vvmk/bhf-bournemouth-bay-10k-run-2009.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>1</thr:total><feedburner:origLink>http://richallen.blogspot.com/2009/01/bhf-bournemouth-bay-10k-run-2009.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-5006971953714839458</guid><pubDate>Thu, 08 Jan 2009 10:13:00 +0000</pubDate><atom:updated>2009-01-08T02:13:26.184-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">WPF</category><category domain="http://www.blogger.com/atom/ns#">NxtGenUG</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><category domain="http://www.blogger.com/atom/ns#">Design</category><title>The Tricky Design Experience with Dr. Neil Roodyn</title><description>&lt;p&gt;Next week on Thursday January 15th we've got Tricky Basset coming to show us the 'Tricky Design Experience' at NxtGenUG Southampton. After seeing Bill Buxton's key note at Remix '08 it became clear that Microsoft is really moving into this design space with some considerable vigour, the concept of people not buying products but buying experiences is something that Microsoft seem to have missed over the years whereas companies like Apple have seemed to excel.&lt;/p&gt;  &lt;p&gt;Tricky will talking us through his team's iterative approach to design including Branding, Ideation, Research, Sketching and Conceptualisation and showing off some great WPF and Silverlight projects.&lt;/p&gt;  &lt;p&gt;As a special treat Tricky has invited &lt;a href="http://drneil.blogspot.com/" target="_blank"&gt;Dr. Neil Roodyn&lt;/a&gt; (&lt;a href="https://mvp.support.microsoft.com/profile=BD4DC19A-A1B7-49B4-90B2-EB41C67F980F" target="_blank"&gt;MVP&lt;/a&gt;) to travel all the way from the land of Oz to join him for this exclusive session at NxtGenUG Southampton, together they shall be providing an interactive session with lots of audience interaction.&lt;/p&gt;  &lt;p&gt;Design is something that I've always wanted to get a grip on (in that I have no design skills whatsoever) and I personally can't wait for this session it is stacking up to be an awesome experience and one not to be missed.&lt;/p&gt;  &lt;p&gt;See you there!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-5006971953714839458?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/wn3a0FD97Zo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/wn3a0FD97Zo/tricky-design-experience-with-dr-neil.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>0</thr:total><feedburner:origLink>http://richallen.blogspot.com/2009/01/tricky-design-experience-with-dr-neil.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-4910328221991421011</guid><pubDate>Fri, 12 Dec 2008 11:25:00 +0000</pubDate><atom:updated>2008-12-12T03:25:25.022-08:00</atom:updated><title>Awesome WPF Data Binding Session</title><description>&lt;p&gt;Last night saw a great session at NxtGenUG Southampton with Josh Twist showing us his WPF data binding and Expression Blend skills. It was the second time I've seen him do this session and its still great.&lt;/p&gt;  &lt;p&gt;For anyone interested Josh's blog is: &lt;a href="http://www.thejoyofcode.com"&gt;http://www.thejoyofcode.com&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-4910328221991421011?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/Jui9z-90rnc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/Jui9z-90rnc/awesome-wpf-data-binding-session.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>0</thr:total><feedburner:origLink>http://richallen.blogspot.com/2008/12/awesome-wpf-data-binding-session.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-7413017846145577161</guid><pubDate>Wed, 10 Dec 2008 13:50:00 +0000</pubDate><atom:updated>2008-12-10T05:50:47.948-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">WPF</category><category domain="http://www.blogger.com/atom/ns#">NxtGenUG</category><title>Lets Twist Again</title><description>&lt;p&gt;If anybody attended Fest '08 this year and you managed to see Josh Twist perform his WPF and data binding magic then you will know that this guy is an excellent speaker who delivers a fun packed informative session that certainly left me thinking &amp;quot;wow...so that is how you are supposed to use all of this Expression Blend stuff&amp;quot;. &lt;/p&gt;  &lt;p&gt;Well tomorrow sees the return of the Twist to NxtGenUG but this time we have the pleasure of his company down on the south coast in the Southampton region, Josh will be giving us a WPF and data binding refresher with some new stuff for those that managed to catch the Fest 08 session.&lt;/p&gt;  &lt;p&gt;Of course there will be the usual pizza and swag and hey as it's the festive may be there will some merriment of some kind.&lt;/p&gt;  &lt;p&gt;Hope to see you there&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-7413017846145577161?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/Pj2DNSMRJkM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/Pj2DNSMRJkM/lets-twist-again.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>1</thr:total><feedburner:origLink>http://richallen.blogspot.com/2008/12/lets-twist-again.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-9032623733596901858</guid><pubDate>Mon, 24 Nov 2008 20:54:00 +0000</pubDate><atom:updated>2008-11-24T12:54:47.269-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">NxtGenUG</category><title>SQL Server 2008 with Eric Nelson</title><description>&lt;p&gt;It feels like it's been forever since the last NxtGenUG meeting but as luck would have it this Thursday sees November's instalment. We've got Microsoft Evangelist Eric Nelson coming down to pay us a visit and give a detailed discussion on the new features of SQL Server 2008 that we all might find a little useful.&lt;/p&gt;  &lt;p&gt;There will be the usual pizza and of course swag (which may include some SQL Server Standard licenses) if you are lucky.&lt;/p&gt;  &lt;p&gt;For more information check it out &lt;a href="http://www.nxtgenug.net/ViewEvent.aspx?EventID=169" target="_blank"&gt;here&lt;/a&gt; and don't forget to register.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-9032623733596901858?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/5ZuiMqgSUjk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/5ZuiMqgSUjk/sql-server-2008-with-eric-nelson.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>0</thr:total><feedburner:origLink>http://richallen.blogspot.com/2008/11/sql-server-2008-with-eric-nelson.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-8372336900119219477</guid><pubDate>Tue, 21 Oct 2008 08:27:00 +0000</pubDate><atom:updated>2008-10-21T01:27:04.810-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Scrum</category><category domain="http://www.blogger.com/atom/ns#">NxtGenUG</category><category domain="http://www.blogger.com/atom/ns#">Agile</category><title>Another Cracking Session</title><description>&lt;p&gt;Last Thursday 16th October saw another great session at NxtGenUG Southampton, &lt;a href="http://plamenbalkanski.blogspot.com" target="_blank"&gt;Plamen Balkanski&lt;/a&gt; and myself discussed Scrum and Agile techniques and end the session with a planning game that was based around a NxtGen pizza machine.&lt;/p&gt;  &lt;p&gt;Everyone was split into groups of 5 people and given two iterations of 10 minutes to produce drawings/models of the end product, the whole point of the game is to give people a very brief introduction into what it might feel like to be on an agile team. The response we had from most members was generally positive and they all had fun although some people were a little confused and didn't quite get it.&lt;/p&gt;  &lt;p&gt;If any one is interested in the slides they can be found &lt;a href="http://cid-f494a10bd3c1cddb.skydrive.live.com/browse.aspx/Public/NxtGenUG" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-8372336900119219477?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/tr1RdKuDOL0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/tr1RdKuDOL0/another-cracking-session.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>1</thr:total><feedburner:origLink>http://richallen.blogspot.com/2008/10/another-cracking-session.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-8035744592927073097</guid><pubDate>Thu, 09 Oct 2008 22:11:00 +0000</pubDate><atom:updated>2008-10-09T15:11:01.500-07:00</atom:updated><title>"Agile" Birthday to Us</title><description>&lt;p&gt;So my run of presenting seems to be continuing what with my WatiN nuggets at &lt;a href="http://www.nxtgenug.net/Region.aspx?RegionID=9" target="_blank"&gt;NxtGenUG Southampton&lt;/a&gt;, followed by my WatiN nugget success at Remix 08 and then a recent WatiN nugget at &lt;a href="http://www.nxtgenug.net/Region.aspx?RegionID=8" target="_blank"&gt;NxtGenUG Cambridge&lt;/a&gt; I figured it was may be time for a change. So I am teaming up with a good friend of mine &lt;a href="http://plamenbalkanski.blogspot.com/" target="_blank"&gt;Plamen Balkanski&lt;/a&gt; to do a full session on Scrum and Agile methods at &lt;a href="http://www.nxtgenug.net/Region.aspx?RegionID=9" target="_blank"&gt;NxtGenUG Southampton&lt;/a&gt;, it's also the Southampton region's 1st birthday so it should be quite fun with the usual pizza and swag a plenty. &lt;/p&gt;  &lt;p&gt;The session will essentially be an introduction to Scrum, what is it all about and why your company may benefit from using it, but we'll also be getting everyone involved in an agile planning game that will ensure that every single attendee will &amp;quot;feel&amp;quot; what it is like to be involved in an Agile project when it is done correctly.&lt;/p&gt;  &lt;p&gt;The session is taking place on Thursday 16th October and you can find more details about it &lt;a href="http://www.nxtgenug.net/ViewEvent.aspx?EventID=166" target="_blank"&gt;here&lt;/a&gt;, I look forward to seeing you there. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-8035744592927073097?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/hL0VD1y3QSk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/hL0VD1y3QSk/birthday-to-us.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>2</thr:total><feedburner:origLink>http://richallen.blogspot.com/2008/10/birthday-to-us.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-1533178997561842094</guid><pubDate>Thu, 09 Oct 2008 21:44:00 +0000</pubDate><atom:updated>2008-10-09T14:44:12.493-07:00</atom:updated><title>WatiNCF - Live on CodePlex</title><description>&lt;p&gt;I've had a fair bit of interest in my WatiN Controller Framework recently and after attending Remix the other week and seeing &lt;a href="http://blogs.msdn.com/saraford/" target="_blank"&gt;Sara Ford&lt;/a&gt; (her blog has some awesome Visual Studio tips and tricks) doing a talk about CodePlex and it's new integration with Subversion clients such as Tortoise SVN I decided it was about time I published it, so for anybody that may be interested, the project can be found at &lt;a href="http://www.codeplex.com/WatiNCF"&gt;http://www.codeplex.com/WatiNCF&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;At the moment there aren't any help files apart from my blog and there is no installation file so you'll just have to download the source code and build it for yourself, if I get a bit of time over the coming weeks I'll post a bit more about how you go about using the framework but if you have any immediate questions in the short term just let me know.&lt;/p&gt;  &lt;p&gt;Please feel free to add any comments or submit proposals for changes or even contribute to the project if you like, just let me know how you get on with it if it helps you or even if it doesn't.&lt;/p&gt;  &lt;p&gt;I hope you find this useful in some way.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-1533178997561842094?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/Dpj6gfnyd2E" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/Dpj6gfnyd2E/watincf-live-on-codeplex.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>1</thr:total><feedburner:origLink>http://richallen.blogspot.com/2008/10/watincf-live-on-codeplex.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-5893192209090076211</guid><pubDate>Tue, 30 Sep 2008 10:27:00 +0000</pubDate><atom:updated>2008-09-30T03:27:21.312-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.NET Developer Network</category><category domain="http://www.blogger.com/atom/ns#">Rhino Mocks</category><category domain="http://www.blogger.com/atom/ns#">NxtGenUG</category><category domain="http://www.blogger.com/atom/ns#">ALT .NET</category><title>Rhinos Stampeding Bristol User Group</title><description>&lt;p&gt;People in the community are generally quite a friendly bunch but now and again the green eyed monster can creep up on you when you find that a fellow user group has managed to get an absolutely great speaker and this one is no exception. &lt;/p&gt;  &lt;p&gt;Our good friend &lt;a href="http://www.guysmithferrier.com/" target="_blank"&gt;Guy Smith-Ferrier&lt;/a&gt; has managed to secure a session with &lt;a href="http://ayende.com/blog/" target="_blank"&gt;Oren Eini (aka Ayende Rahien)&lt;/a&gt;, the founder of Rhino Mocks and major contributor to Castle and NHibernate, over at the .NET Developer Network in Bristol. This has come at relatively short notice as Oren is only around for the next couple of weeks. The event takes place on Monday 13th October, more details can be found &lt;a href="http://www.dotnetdevnet.com/Meetings/tabid/54/EntryID/26/Default.aspx" target="_blank"&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;The session details are as follows:&lt;/p&gt;  &lt;p&gt;&amp;quot;Producing Production Quality Software&amp;quot; Abstract:&lt;/p&gt;  &lt;p&gt;Working software is no longer the only thing that we need to produce. We need to create a software system that has a chance of surviving in the cruel world of production system, outside the clean room and sterile environment of development and QA. Understanding bottlenecks in the system, preventing cascading failures and recovery strategies have ceased being the problems of the very high end players. With the cost of system downtime being measures in $$$/second, this is an area we have to consider all the way. In this talk we will cover how we can map common weaknesses in the system design, preemptively protect ourselves from them, and produce software systems that can withstand the real world hostile environment.&lt;/p&gt;  &lt;p&gt;&amp;quot;Interaction based testing with Rhino Mocks&amp;quot; Abstract:&lt;/p&gt;  &lt;p&gt;Beyond the simplest scenarios, all objects had collaborators that they work with. This flies in the face of testing objects in isolation. This is the problem that mock objects were created to solve. In this talk you will learn what mock objects are, how to utilize them and best practices on when / how to utilize them. Rhino Mocks is a mock objects framework for .Net whose core goals are to let the developer rely on the compiler work well with refactoring tools.&lt;/p&gt;  &lt;p&gt;Seriously, if you want to hear from a person whom many consider a legend in our industry and you can make it to Bristol on that day, this would be one not to miss!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-5893192209090076211?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/MelC4-FDBnk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/MelC4-FDBnk/rhinos-stampeding-bristol-user-group.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>2</thr:total><feedburner:origLink>http://richallen.blogspot.com/2008/09/rhinos-stampeding-bristol-user-group.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-2979535110574714446</guid><pubDate>Sun, 21 Sep 2008 19:36:00 +0000</pubDate><atom:updated>2008-09-21T12:36:00.752-07:00</atom:updated><title>Remix '08 and Ready, Steady, Speak Success</title><description>&lt;p&gt;I've spent Thursday and Friday at Remix '08 and I must say I had a great time, from the key note by Bill Buxton and Scott Guthrie to the excellent Swag Phrase events at the community stage during the intervals it was a excellent couple of days that were well worth attending. &lt;/p&gt;  &lt;p&gt;Admittedly I had already learned a lot about some of the developer talks that were taking place by attending other community events I had attended over the year so I took the opportunity to go to a couple of the design flavoured talks by Bill Buxton and I must say it was well worth it, design certainly is not my strong point and anything I can do to try and improve my understanding of how it should be applied cannot be a bad thing, I managed to pick up of few key points about not trying to design the perfect product in one go and some cheeky little prototyping tricks such as using magnets to mimic working screen shots.&lt;/p&gt;  &lt;p&gt;Certainly my highlight of the event was the Ready, Steady, Speak competition. It was my first opportunity to talk to about my chosen subject to a large number of people at a major UK event, I've done a couple of nuggets at NxtGenUG - Southampton from time to time but nothing on this kind of scale. My chosen topic was WatiN and arriving at Remix I was happy with the presentation I had put together. There were six competitors in total taking part in two heats on the Thursday with the top two going through to a final session on the Friday, topics from other competitors included ASP .NET MVC, &lt;a href="http://oauth.net/" target="_blank"&gt;OAuth&lt;/a&gt;, HSL (Hue/Saturation/Luminance), &lt;a href="http://serialseb.blogspot.com/2008/04/using-rasta-1-introduction.html" target="_blank"&gt;Rasta&lt;/a&gt; and using Silverlight to perform cross browser window communication.&lt;/p&gt;  &lt;p&gt;In the first heats I was last on which gave me an opportunity to see all of the competition but also for the nerves to build up, and up and up :-). There were four panel judges who passed judgement on each of the presentations and gave some useful comments on how the presentations could be improved, after my first attempt I had a couple of comments about the colour of my hyperlinks and also the fact that I seemed to keep pacing forwards and then backwards which gave away how nervous I was. Thankfully I was voted through to the final and had an opportunity to improve the presentation over night. &lt;/p&gt;  &lt;p&gt;The following day the final was at lunch time and I had to perform the same presentation again, I had changed the colour of my hyperlinks and was determined to make use of the entire stage as had been suggested by the judges from the previous heat, this surprisingly had the effect of taking my mind off of how nervous I was and I had a couple of comments from people who had said that my nerves didn't show through so that was could. &lt;/p&gt;  &lt;p&gt;So all the presentations were over and it was up to the judges final decision, and they chose me...woo hoo cool! For all of my efforts I won an XBox 360 Elite with three games, nice!&lt;/p&gt;  &lt;p&gt;John Mcloughlin and I did plenty of networking and made sure that we gave out as many NxtGen business cards as we could and also drummed up as much swag as possible, we also managed to secure a few sessions for the new year including the potential of a &lt;a href="http://www.microsoft.com/surface/index.html" target="_blank"&gt;Microsoft Surface&lt;/a&gt; demo and talk after we had our own hands on experience of it. &lt;/p&gt;  &lt;p&gt;All in all, I thought the Remix event was excellent and well worth attending (possibly slightly influenced by by winning a competition), special thanks goes out to Dave McMahon, Richard Costall and John Price (the NxtGenUG founders) for organising the Ready, Steady, Speak competition and allowing me to have this opportunity.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-2979535110574714446?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/3ngjWnJwf3E" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/3ngjWnJwf3E/remix-and-ready-steady-speak-success.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>4</thr:total><feedburner:origLink>http://richallen.blogspot.com/2008/09/remix-and-ready-steady-speak-success.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-4324045103861131530</guid><pubDate>Wed, 10 Sep 2008 15:06:00 +0000</pubDate><atom:updated>2008-09-10T08:06:14.344-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">NxtGenUG</category><title>CSLA .NET at NxtGenUG Southampton</title><description>&lt;p&gt;Tomorrow night, Thursday 11th September, we've got a great session lined up at NxtGenUG, Andrew Hallmark, Technical Architect from Maritz, is coming over to talk to us about the CSLA .NET framework and code generation tools.&lt;/p&gt;  &lt;p&gt;If anyone managed to make to our session on Object Thinking by Alan Dean be sure not to miss this session, essentially Alan spoke about the theory behind Object Thinking and how we should be changing our approaches to developing object oriented. Well Rockford Lhotka, author of the CSLA, has based his &amp;quot;Expert Business Objects&amp;quot; framework upon some of those theories and in my opinion this is the closest you will get to an implementation of true Object Thinking. Even if you think you know CSLA already there may be a few tips and tricks and implementation ideas that you may find useful. &lt;/p&gt;  &lt;p&gt;As usual there will be pizza and swag, so what are you waiting for sign up now and come along, see you there.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-4324045103861131530?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/__1RV-OHXj4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/__1RV-OHXj4/csla-net-at-nxtgenug-southampton.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>0</thr:total><feedburner:origLink>http://richallen.blogspot.com/2008/09/csla-net-at-nxtgenug-southampton.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-841504838555674398</guid><pubDate>Mon, 08 Sep 2008 20:42:00 +0000</pubDate><atom:updated>2008-09-08T13:42:18.292-07:00</atom:updated><title>Ready, Steady, Speak at Remix 08</title><description>&lt;p&gt;Next week, 18th and 19th September, sees the arrival of Remix 08 in Brighton and as seems to be the general trend at these big events of late, NxtGenUG are getting really involved and this time they'll be running another Ready, Steady, Speak competition similar to those seen at Tech Ed and the Microsoft 2008 UK Launch.&lt;/p&gt;  &lt;p&gt;The general format is as follows:&lt;/p&gt;  &lt;p&gt;Contestants will present a 5 min session on a subject of their choice relating to Web Development or Web Design.&amp;#160; They will present in front of the REMIX audience and in front of a panel of judges.&amp;#160; If there are more than a&amp;#160; certain number of contestants (TBD), there will be &amp;#8216;heats&amp;#8217; earlier in the day with the winners of the heats in a &amp;#8216;speak-off&amp;#8217; in the evening session.&amp;#160; The &amp;#8216;speak-off&amp;#8217; will take place as stated in the evening of the first day of MIX and the first prize is an XBox 360 + Goodies! &lt;/p&gt;  &lt;p&gt;Prerequisites:&lt;/p&gt;  &lt;p&gt;Mandatory&lt;/p&gt;  &lt;p&gt;&amp;#183; Speakers must NOT have previously presented &amp;#8216;full sessions&amp;#8217; at DDD, TechEd, DevWeek, SDN, SQLBITS, VBUG Conference, NxtGenUG FEST or any similar such conferences.&lt;/p&gt;  &lt;p&gt;&amp;#183; Speakers must create a new session of their own with new material which can be based on existing material but cannot be a simple copy of it.&lt;/p&gt;  &lt;p&gt;&amp;#183; Speakers must limit their session to as close to 5 mins as possible( overrunning time will cause the speaker to be marked down.)&lt;/p&gt;  &lt;p&gt;&amp;#183; Speakers must not have previously won Speaker Idol or &amp;#8220;Ready Steady Speak&amp;#8221; UK Launch &amp;#8211; Sorry to James Coulter J!&lt;/p&gt;  &lt;p&gt;&amp;#183; Speakers must state their desire to enter the competition by no later than COP Monday 15&lt;sup&gt;th&lt;/sup&gt; September 2008.&lt;/p&gt;  &lt;p&gt;Desirable&lt;/p&gt;  &lt;p&gt;&amp;#183; Speakers should provide if at all possible their own laptop, but one can be provided if necessary.&amp;#160; The speaker should notify the organisers of any software prerequisites.&lt;/p&gt;  &lt;p&gt;&amp;#183; Speakers should have spoken previously at a User Group meeting even if only for a 10 min mini-session or &amp;#8216;nugget&amp;#8217;.&amp;#160; This is NOT mandatory&lt;/p&gt;  &lt;p&gt;To show my support and get a bit of exposure to a larger audience for speaking, I have offered to join in the fun and take part in the competition with a slightly re-worked version of my WatiN nugget that I performed in Southampton last month. So I'll be spending the next couple of weeks getting really nervous and trying to figure out the best presentation I can muster.&lt;/p&gt;  &lt;p&gt;Remix 08 looks set to be a great event including at least one session from Scott Guthrie, I'll be there and it would be good to see some of you there too (if not only for the moral support!).&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-841504838555674398?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/mba5uJZhyHQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/mba5uJZhyHQ/ready-steady-speak-at-remix-08.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>0</thr:total><feedburner:origLink>http://richallen.blogspot.com/2008/09/ready-steady-speak-at-remix-08.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2724692278714295115.post-7091211259795196592</guid><pubDate>Fri, 22 Aug 2008 16:58:00 +0000</pubDate><atom:updated>2008-09-15T15:28:15.547-07:00</atom:updated><title>WatiN, Ajax and some Extension Methods</title><description>&lt;p&gt;Whilst I've been working with WatiN over the past couple of months I have encountered a few issues especially that unfortunately WatiN was unable to solve straight out of the box, so I thought I would knock a post together that contains the extension methods I have managed to cobble together from various sources on the Internet and a little bit from my own head.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;WaitUntilEnabled&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I encountered this issue whilst working with the CascadingDropDown provided by the &lt;a href="http://www.asp.net/ajax/ajaxcontroltoolkit/samples/" target="_blank"&gt;Ajax Control Toolkit&lt;/a&gt;, now WatiN does provide a function called WaitUntil which allows you to pass in the name of the attribute you want to examine and the value that you expect the attribute to become, unfortunately however, it seems the CascadingDropDown adds a &amp;quot;disabled&amp;quot; attribute with a value of &amp;quot;true&amp;quot; to the html page. The drop down list then becomes enabled when the disabled attribute no longer exists or is set to false. Therefore it was necessary to write an extension method that waited until the control no longer had a &amp;quot;disabled&amp;quot; property with a value of &amp;quot;true. The method is as follows:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: gray"&gt;        /// &amp;lt;summary&amp;gt;&lt;br /&gt;        /// &lt;/span&gt;&lt;span style="color: green"&gt;Waits until the specified element is enabled within the web page.&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;        /// &amp;lt;param name=&amp;quot;element&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The element.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public static &lt;/span&gt;T WaitUntilEnabled&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;this &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IElement &lt;/span&gt;element) &lt;span style="color: blue"&gt;where &lt;/span&gt;T : &lt;span style="color: blue"&gt;class&lt;br /&gt;        &lt;/span&gt;{&lt;br /&gt;            &lt;span style="color: blue"&gt;var &lt;/span&gt;timer = &lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;SimpleTimer&lt;/span&gt;(&lt;span style="color: #2b91af"&gt;IE&lt;/span&gt;.Settings.WaitForCompleteTimeOut);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue"&gt;do&lt;br /&gt;            &lt;/span&gt;{&lt;br /&gt;                &lt;span style="color: blue"&gt;var &lt;/span&gt;value = element.GetAttributeValue(&lt;span style="color: #a31515"&gt;&amp;quot;disabled&amp;quot;&lt;/span&gt;);&lt;br /&gt;                &lt;br /&gt;                &lt;span style="color: blue"&gt;if &lt;/span&gt;(value != &lt;span style="color: #a31515"&gt;&amp;quot;True&amp;quot; &lt;/span&gt;&amp;amp;&amp;amp; &lt;br /&gt;                    value != &lt;span style="color: #a31515"&gt;&amp;quot;true&amp;quot;&lt;/span&gt;)&lt;br /&gt;                {&lt;br /&gt;                    &lt;span style="color: blue"&gt;return &lt;/span&gt;element &lt;span style="color: blue"&gt;as &lt;/span&gt;T;&lt;br /&gt;                }&lt;br /&gt;                &lt;span style="color: #2b91af"&gt;Thread&lt;/span&gt;.Sleep(200);&lt;br /&gt;            }&lt;br /&gt;            &lt;span style="color: blue"&gt;while &lt;/span&gt;(!timer.Elapsed);&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue"&gt;throw new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;TimeoutException&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;Waited too long for &amp;quot; &lt;/span&gt;+ element.Id + &lt;span style="color: #a31515"&gt;&amp;quot; to become enabled&amp;quot;&lt;/span&gt;);&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;UPDATED 15/09/08: Whilst preparing for my Ready, Steady, Speak session at Remix I came across a small bug where the value retrieved for the disabled attribute was &amp;quot;True&amp;quot; instead of &amp;quot;true&amp;quot; as initially thought, I don't know what caused the difference to occur but I have added the additional check anyway.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The usage of this method is as follows:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;        ie.SelectList(&lt;span style="color: #2b91af"&gt;Find&lt;/span&gt;.ById(&lt;span style="color: #a31515"&gt;&amp;quot;MyCascadingDropDown&amp;quot;&lt;/span&gt;)).WaitUntilEnabled().Select(&lt;span style="color: #a31515"&gt;&amp;quot;AValue&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;IfExists&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This is just an extension method I wrote to make it a little easier to work with elements that don't exist:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: gray"&gt;        /// &amp;lt;summary&amp;gt;&lt;br /&gt;        /// &lt;/span&gt;&lt;span style="color: green"&gt;Checks whether the element exists, if so performs the specified action,&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: gray"&gt;/// &lt;/span&gt;&lt;span style="color: green"&gt;otherwise just returns the current element object.&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;        /// &amp;lt;typeparam name=&amp;quot;T&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The type of element to check for existence.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/typeparam&amp;gt;&lt;br /&gt;        /// &amp;lt;param name=&amp;quot;element&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The element.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;        /// &amp;lt;param name=&amp;quot;action&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The action.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;        /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public static &lt;/span&gt;T IfExists&amp;lt;T&amp;gt;(&lt;span style="color: blue"&gt;this &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Element &lt;/span&gt;element, &lt;span style="color: #2b91af"&gt;Action&lt;/span&gt;&amp;lt;T&amp;gt; action) &lt;span style="color: blue"&gt;where &lt;/span&gt;T : &lt;span style="color: blue"&gt;class&lt;br /&gt;        &lt;/span&gt;{&lt;br /&gt;            &lt;span style="color: blue"&gt;if &lt;/span&gt;(element.Exists)&lt;br /&gt;            {&lt;br /&gt;                action(element &lt;span style="color: blue"&gt;as &lt;/span&gt;T);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;element &lt;span style="color: blue"&gt;as &lt;/span&gt;T;&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;This method can be used as follows:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;        ie.TextField(&lt;span style="color: #2b91af"&gt;Find&lt;/span&gt;.ById(&lt;span style="color: #a31515"&gt;&amp;quot;MyTextField&amp;quot;&lt;/span&gt;)).IfExists&amp;lt;&lt;span style="color: #2b91af"&gt;TextField&lt;/span&gt;&amp;gt;(e =&amp;gt; e.TypeText(&lt;span style="color: #a31515"&gt;&amp;quot;AValue&amp;quot;&lt;/span&gt;));&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;strong&gt;&lt;/strong&gt;&amp;#160;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;WaitForAsyncPostBackToComplete&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;If you are working with controls within an update panel you will inevitably come across a situation where a value is changed via an async postback and whilst that postback is taking place WatiN will try and perform another action which results in an error.The solution to this problem was found after searching the Internet for a little while and I came across this &lt;a href="http://pushpontech.blogspot.com/2008/04/ajax-issues-with-watin.html" target="_blank"&gt;post&lt;/a&gt; which explains the problem in a little more detail.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I have modified the original method slightly to make it an extension for the IE browser object, it is used to determine whether the current page is within an asynchronous postback, &lt;strike&gt;unfortunately in order to use this method the page you are testing needs to have a JavaScript method defined so if you don't have control over the website you could be a little stuck, here is the Javascript: &lt;/strike&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;  &lt;pre class="code"&gt;&lt;strike&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;script &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;/strike&gt;&lt;strike&gt;&lt;span style="color: blue"&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;      &lt;br /&gt;    var &lt;/span&gt;prm = Sys.WebForms.PageRequestManager.getInstance();      &lt;br /&gt;    &lt;span style="color: blue"&gt;function &lt;/span&gt;IsPageInAsyncPostback()&lt;br /&gt;    {            &lt;br /&gt;        &lt;span style="color: blue"&gt;return &lt;/span&gt;prm.get_isInAsyncPostBack();         &lt;br /&gt;    }    &lt;br /&gt;&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;script&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/strike&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strike&gt;The C# method implementation is as follows:&lt;/strike&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: gray"&gt;&lt;strike&gt;        /// &amp;lt;summary&amp;gt;&lt;br /&gt;        /// &lt;/strike&gt;&lt;/span&gt;&lt;span style="color: green"&gt;&lt;strike&gt;Waits for async post back to complete.&lt;br /&gt;        &lt;/strike&gt;&lt;/span&gt;&lt;strike&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;        /// &amp;lt;param name=&amp;quot;ie&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The ie instance to use.&lt;/span&gt;&lt;/strike&gt;&lt;strike&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public static void &lt;/span&gt;WaitForAsyncPostBackToComplete(&lt;span style="color: blue"&gt;this &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IE &lt;/span&gt;ie)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;bool &lt;/span&gt;isInPostback = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;br /&gt;            &lt;span style="color: blue"&gt;while &lt;/span&gt;(isInPostback)&lt;br /&gt;            {&lt;br /&gt;                isInPostback = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToBoolean(ie.Eval(&lt;span style="color: #a31515"&gt;&amp;quot;IsPageInAsyncPostback();&amp;quot;&lt;/span&gt;));&lt;br /&gt;                &lt;span style="color: blue"&gt;if &lt;/span&gt;(isInPostback)&lt;br /&gt;                {&lt;br /&gt;                    &lt;span style="color: #2b91af"&gt;Thread&lt;/span&gt;.Sleep(200); &lt;/strike&gt;&lt;strike&gt;&lt;span style="color: green"&gt;//sleep for 200ms and query again &lt;br /&gt;                &lt;/span&gt;}&lt;br /&gt;            }&lt;br /&gt;        }&lt;/strike&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;After a kind comment from Jo (see below), I have modified this as there is no need to place the IsPageInAsyncPostback method inside of the page, I just needed to modify the Eval method to make the entire call, as follows:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: gray"&gt;        /// &amp;lt;summary&amp;gt;&lt;br /&gt;        /// &lt;/span&gt;&lt;span style="color: green"&gt;Waits for async post back to complete.&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;        /// &amp;lt;param name=&amp;quot;ie&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The ie instance to use.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public static void &lt;/span&gt;WaitForAsyncPostBackToComplete(&lt;span style="color: blue"&gt;this &lt;/span&gt;&lt;span style="color: #2b91af"&gt;IBrowser &lt;/span&gt;ie)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;switch &lt;/span&gt;(ie.BrowserType)&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: blue"&gt;case &lt;/span&gt;&lt;span style="color: #2b91af"&gt;BrowserType&lt;/span&gt;.InternetExplorer:&lt;br /&gt;                    {&lt;br /&gt;                        &lt;span style="color: blue"&gt;bool &lt;/span&gt;isInPostback = &lt;span style="color: blue"&gt;true&lt;/span&gt;;&lt;br /&gt;                        &lt;span style="color: blue"&gt;while &lt;/span&gt;(isInPostback)&lt;br /&gt;                        {&lt;br /&gt;                            isInPostback = &lt;span style="color: #2b91af"&gt;Convert&lt;/span&gt;.ToBoolean(ie.Eval(&lt;span style="color: #a31515"&gt;&amp;quot;Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();&amp;quot;&lt;/span&gt;));&lt;br /&gt;                            &lt;span style="color: blue"&gt;if &lt;/span&gt;(isInPostback)&lt;br /&gt;                            {&lt;br /&gt;                                &lt;span style="color: #2b91af"&gt;Thread&lt;/span&gt;.Sleep(200); &lt;span style="color: green"&gt;//sleep for 200ms and query again &lt;br /&gt;                            &lt;/span&gt;}&lt;br /&gt;                        }&lt;br /&gt;                        &lt;span style="color: blue"&gt;break&lt;/span&gt;;&lt;br /&gt;                    }&lt;br /&gt;            }&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;And can be used like this:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: #2b91af"&gt;            SelectList &lt;/span&gt;list = ie.SelectList(&lt;span style="color: #2b91af"&gt;Find&lt;/span&gt;.ById(&lt;span style="color: #a31515"&gt;&amp;quot;MySelectList&amp;quot;&lt;/span&gt;));&lt;br /&gt;            list.Option(&lt;span style="color: #a31515"&gt;&amp;quot;TestOption&amp;quot;&lt;/span&gt;).Select();&lt;br /&gt;            &lt;br /&gt;            ie.WaitForAsyncPostBackToComplete();&lt;br /&gt;            &lt;br /&gt;            &lt;span style="color: #2b91af"&gt;SelectList &lt;/span&gt;childList = ie.SelectList(&lt;span style="color: #2b91af"&gt;Find&lt;/span&gt;.ById(&lt;span style="color: #a31515"&gt;&amp;quot;MyChildSelectList&amp;quot;&lt;/span&gt;));&lt;br /&gt;            list.Option(&lt;span style="color: #a31515"&gt;&amp;quot;TestChildOption&amp;quot;&lt;/span&gt;).Select();&lt;/pre&gt;&lt;br /&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;ByPartialId&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The final useful method is ByPartialId, this is merely a wrapper around a regular expression but it does save quite a bit of typing and needing to remember the regular expression syntax. I found this on &lt;a href="http://www.ayende.com/Blog/archive/2007/03/09/Writing-WatiN-Tests.aspx" target="_blank"&gt;Ayende Rahien's blog&lt;/a&gt;:&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;span style="color: gray"&gt;        /// &amp;lt;summary&amp;gt;&lt;br /&gt;        /// &lt;/span&gt;&lt;span style="color: green"&gt;Gets an attribute constraint using a partial id.&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: gray"&gt;/// &amp;lt;/summary&amp;gt;&lt;br /&gt;        /// &amp;lt;param name=&amp;quot;partialElementId&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color: green"&gt;The partial element id.&lt;/span&gt;&lt;span style="color: gray"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;        /// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: blue"&gt;public static &lt;/span&gt;&lt;span style="color: #2b91af"&gt;AttributeConstraint &lt;/span&gt;ByPartialId(&lt;span style="color: blue"&gt;string &lt;/span&gt;partialElementId)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: blue"&gt;return &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Find&lt;/span&gt;.ById(&lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Regex&lt;/span&gt;(&lt;span style="color: #a31515"&gt;&amp;quot;.*&amp;quot; &lt;/span&gt;+ partialElementId + &lt;span style="color: #a31515"&gt;&amp;quot;$&amp;quot;&lt;/span&gt;));&lt;br /&gt;        }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="code"&gt;&amp;#160;&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2724692278714295115-7091211259795196592?l=richallen.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/RichiesWorld/~4/9CQLMmfKEtg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/RichiesWorld/~3/9CQLMmfKEtg/watin-ajax-and-some-extension-methods.html</link><author>noreply@blogger.com (Richard Allen)</author><thr:total>10</thr:total><feedburner:origLink>http://richallen.blogspot.com/2008/08/watin-ajax-and-some-extension-methods.html</feedburner:origLink></item></channel></rss>

