<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://agileisrael.org/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'altnetconf' and 'Agile'</title><link>http://agileisrael.org/cs/search/SearchResults.aspx?o=DateDescending&amp;tag=altnetconf,Agile&amp;orTags=0</link><description>Search results matching tags 'altnetconf' and 'Agile'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 (Build: 20416.853)</generator><item><title>ALT.NET Israel II - Done</title><link>http://agileisrael.org/cs/blogs/royo/archive/2009/04/03/alt-net-israel-ii-done.aspx</link><pubDate>Fri, 03 Apr 2009 12:44:00 GMT</pubDate><guid isPermaLink="false">23a435e0-515b-467d-ba86-b6d13375d82b:2234</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;It was fun doing ALT.NET in Israel again. For those of you who didn’t make it, &lt;a href="http://blogs.microsoft.co.il/blogs/gadim/"&gt;Gadi&lt;/a&gt; has a very good play by play list of posts in hebrew (&lt;a href="http://blogs.microsoft.co.il/blogs/gadim/archive/2009/04/02/264000.aspx"&gt;one&lt;/a&gt;, &lt;a href="http://blogs.microsoft.co.il/blogs/gadim/archive/2009/04/03/264196.aspx"&gt;two&lt;/a&gt;, &lt;a href="http://blogs.microsoft.co.il/blogs/gadim/archive/2009/04/03/264202.aspx"&gt;three&lt;/a&gt;, &lt;a href="http://blogs.microsoft.co.il/blogs/gadim/archive/2009/04/03/264238.aspx"&gt;four&lt;/a&gt;, &lt;a href="http://blogs.microsoft.co.il/blogs/gadim/archive/2009/04/03/264240.aspx"&gt;five&lt;/a&gt;, &lt;a href="http://blogs.microsoft.co.il/blogs/gadim/archive/2009/04/03/264293.aspx"&gt;six&lt;/a&gt;, &lt;a href="http://blogs.microsoft.co.il/blogs/gadim/archive/2009/04/03/264297.aspx"&gt;seven&lt;/a&gt;). Thanks to SELA for donating the classes, and thanks to Typemock for the food!&lt;/p&gt;  &lt;p&gt;I am still fusing my thoughts about what I think the outcomes were. will blog when I have something of meaning to say.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/rosherove/image_5A0A5B7E.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/rosherove/image_thumb_36695780.png" width="322" height="423" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/rosherove/image_2EA962AD.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/rosherove/image_thumb_4FD482E3.png" width="426" height="556" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7024200" width="1" height="1" alt="" /&gt;</description></item><item><title>ALT.NET Israel II happens TODAY</title><link>http://agileisrael.org/cs/blogs/royo/archive/2009/04/02/alt-net-israel-ii-happens-today.aspx</link><pubDate>Thu, 02 Apr 2009 09:23:49 GMT</pubDate><guid isPermaLink="false">23a435e0-515b-467d-ba86-b6d13375d82b:2232</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;Just a quick reminder: ALT.NET Israel II is happening TODAY at 18:30 at SELA.&lt;/p&gt;  &lt;p&gt;Register &lt;a href="http://www.facebook.com/event.php?eid=58042408643&amp;amp;ref=ts&amp;amp;nctrct=1238664040596"&gt;on the facebook page&lt;/a&gt;, and &lt;a href="http://weblogs.asp.net/rosherove/archive/2009/03/17/alt-net-israel-meeting-ii-2d-and-3rd-of-april.aspx"&gt;more details&amp;#160; (without needing facebook) here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7022600" width="1" height="1" alt="" /&gt;</description></item><item><title>ALT.NET Israel – Meeting II 2d and 3rd of April</title><link>http://agileisrael.org/cs/blogs/royo/archive/2009/03/17/alt-net-israel-meeting-ii-2d-and-3rd-of-april.aspx</link><pubDate>Tue, 17 Mar 2009 18:03:06 GMT</pubDate><guid isPermaLink="false">23a435e0-515b-467d-ba86-b6d13375d82b:2221</guid><dc:creator>Anonymous</dc:creator><description>&lt;p align="right"&gt;I’ll just repost this in Hebrew:&lt;/p&gt;  &lt;p align="right"&gt;בשעה טובה ומוצלחת אני שמח לבשר על &lt;b&gt;כנס &lt;a href="http://alt.net/"&gt;alt.net&lt;/a&gt; israel השני&lt;/b&gt;    &lt;br /&gt;&lt;u&gt;&lt;b&gt;מיקום הכנס&lt;/b&gt;&lt;/u&gt;&lt;b&gt;:&lt;/b&gt;    &lt;br /&gt;כמו בפעם שעברה, יתקיים הכנס בבית קבוצת סלע בבני ברק, ליד קניון אילון. תודה לאנשי קבוצת סלע על ההיענות לאירוח.    &lt;br /&gt;פרטים על סלע כאן: &lt;a href="http://www.sela.co.il/"&gt;http://www.sela.co.il/&lt;/a&gt;, ומפת הגעה כאן: &lt;a href="http://www.sela.co.il/?CategoryID=1295&amp;amp;ArticleID=642"&gt;http://www.sela.co.il/?CategoryID=1295&amp;amp;ArticleID=642&lt;/a&gt;    &lt;br /&gt;&lt;u&gt;&lt;b&gt;מה בתוכנית&lt;/b&gt;&lt;/u&gt;&lt;b&gt;?&lt;/b&gt;    &lt;br /&gt;&lt;strong&gt;&lt;u&gt;יום חמישי 02/04 - יום התכנון&lt;/u&gt;&lt;/strong&gt;    &lt;br /&gt;18:30-19:00 התכנסות, רישום וכיבוד קל    &lt;br /&gt;19:00-20:30 פגישת תכנון וקביעת הנושאים לדיון ליום הדיונים    &lt;br /&gt;20:30-&amp;#160; ... המשך לא פורמלי באחד מבתי הקפה / פאבים באיזור    &lt;br /&gt;&lt;/p&gt;  &lt;p align="right"&gt;&lt;strong&gt;&lt;u&gt;יום שישי 03/04 - יום הדיונים&lt;/u&gt;&lt;/strong&gt;    &lt;br /&gt;09:00-09:30 התכנסות, רישום וכיבוד קל    &lt;br /&gt;09:30-09:40 שיחת פתיחה    &lt;br /&gt;09:40-10:50 סבב דיונים ראשון    &lt;br /&gt;11:00-12:10 סבב דיונים שני    &lt;br /&gt;12:20-13:30 סבב דיונים שלישי    &lt;br /&gt;13:30-14:00 ארוחת צהריים    &lt;br /&gt;14:10-15:20 סבב דיונים רביעי    &lt;br /&gt;15:20-16:30 סבב דיונים חמישי    &lt;br /&gt;16:30-17:00 פגישת סיכום    &lt;br /&gt;17:00-&amp;#160; ... המשך לא פורמלי באחד מבתי הקפה / פאבים באיזור    &lt;br /&gt;יתכנו שינויים קלים בשעות הללו, עקב הגמישות של הפורמט. אנא עקבו אחרי רשימת הדיוור הזו ואחרי הבלוגים של המארגנים (רועי אושרוב, ליאור פרידמן וחן אגוזי) על מנת להישאר מעודכנים.    &lt;br /&gt;&lt;a href="http://imistaken.blogspot.com/"&gt;http://imistaken.blogspot.com/&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://weblogs.asp.net/rosherove/"&gt;http://weblogs.asp.net/rosherove/&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://www.kenegozi.com/blog"&gt;http://www.kenegozi.com/blog&lt;/a&gt;    &lt;br /&gt;&lt;b&gt;&lt;u&gt;אזהרת מזג אויר&lt;/u&gt;:&lt;/b&gt;    &lt;br /&gt;מפגש התכנון בחמישי בערב יתקיים על גג הבנין. יתכן שיהיה קריר אז מומלץ לבוא בלבוש חם.     &lt;br /&gt;&lt;u&gt;&lt;b&gt;כמה מילים על הפורמט&lt;/b&gt;&lt;/u&gt;&lt;b&gt;:&lt;/b&gt;    &lt;br /&gt;הכנס הזה לא דומה לכנסים אחרים שאתם מכירים.    &lt;br /&gt;לא מדובר בהרצאות פרונטליות, בהן מספר מצומצם של אנשים בא ללמד את המשתתפים, אלא בדיוני &amp;quot;שולחן עגול&amp;quot;.     &lt;br /&gt;התכנים נקבעים על ידי המשתתפים (זה כולנו) ולא על ידי המארגנים בלבד.    &lt;br /&gt;לכן חשוב להגיע לפגישת התכנון - אז יקבעו תכני הדיונים ליום שישי.    &lt;br /&gt;מי שרוצה ללמוד עוד על הפורמט מוזמן להיכנס ללינקים שמופיעים בהמשך, ו/או לחפש על &lt;a href="http://alt.net/"&gt;ALT.NET&lt;/a&gt; ו &lt;a href="http://alt.net/"&gt;ALT.NET&lt;/a&gt; conf במנוע החיפוש החביב עליכם (גוגל, cuil, delver, live, yahoo ושאר החבורה)    &lt;br /&gt;&lt;u&gt;&lt;b&gt;תחומי עניין&lt;/b&gt;&lt;/u&gt;&lt;b&gt;:&lt;/b&gt;    &lt;br /&gt;מטרת הכנס והקהילה בכלל היא לעורר שיתוף ידע והתדיינות פתוחה בין חברי הקבוצה.    &lt;br /&gt;על מנת לסייע בכך, נבקש מכל אחד מהמשתתפים לשלוח לקבוצה הזו (או אלי לדואל) את הפרטים הבאים:    &lt;br /&gt;1. שם המשתמש איתו אתם מזוהים ברשימת הדיוור הזו     &lt;br /&gt;2. שם אמיתי בעברית (או כינוי בו מכירים אתכם - כמו של Ayende Rahien למשל)    &lt;br /&gt;3. כלי פיתוח מעולם ה .net בו יש למשתתף מומחיות מיוחדת ו/או עניין מיוחד (על מנת לעזור ביצירת דיונים סביב נושאים אלו)    &lt;br /&gt;אנו נשתדל שיופקו מדבקות עם השם ותחומ/י העניין, שכל אחד ידביק על חולצתו במהלך הכנס    &lt;br /&gt;וכך המשתתפים יוכלו לפנות בשאלות האחד לשני במהלך ההפסקות, בזמן האוכל, בדרך לשירותים או בפקקים בדרך הביתה    &lt;br /&gt;&lt;u&gt;&lt;b&gt;עזרה&lt;/b&gt;&lt;/u&gt;&lt;b&gt;:&lt;/b&gt;    &lt;br /&gt;למי שיש ויכול להביא מצלמות לתיעוד האירוע (גם סטילס אבל עדיף וידאו דיגיטלי) זה יהיה מצויין.&amp;#160; המטרה היא להעלות וידאו של כל מפגש ומפגש לאתרי השיתוף השונים.&amp;#160;&amp;#160; גם מצלמת סטילס דיגיטלית שיודעת לצלם וידאו סביר על כרטיס הזיכרון באה בחשבון.&amp;#160; &lt;br /&gt;&lt;u&gt;&lt;b&gt;לינקים רלוונטיים&lt;/b&gt;&lt;/u&gt;&lt;b&gt;:&lt;/b&gt;    &lt;br /&gt;&lt;a href="http://altnetpedia.com/OverviewWhatIsIt.ashx"&gt;http://altnetpedia.com/OverviewWhatIsIt.ashx&lt;/a&gt;    &lt;br /&gt;&lt;u&gt;&lt;b&gt;תיוג&lt;/b&gt;&lt;/u&gt;&lt;b&gt;:&lt;/b&gt;&lt;u&gt;&lt;b&gt;       &lt;br /&gt;&lt;/b&gt;&lt;/u&gt;למי שכותב בלוג, מסמן לינקים בטקנורטי/דלישס/רדיט/דיגיט/אתר-הלינקים-של-מוישל&amp;#39;ה,     &lt;br /&gt;נבקש להשתמש בתג alt-net-israel על מנת שנוכל למצוא ברשת מידע alt.net-י בעברית בקלות&lt;/p&gt;  &lt;p align="right"&gt;&lt;b&gt;&lt;u&gt;פרסום&lt;/u&gt;:&lt;/b&gt;    &lt;br /&gt;נהניתם? ספרו לחברים שלכם. לא נהניתם? חפשו ת&amp;#39;חברים שלכם.&amp;#160; סתאאם. הקהילה מעצם טבעה פתוחה מאוד לביקורת בונה, וכולנו נשמח לשמוע הצעת לייעול / שיפור / שפצור ותחבור. (יש מילה כזו?)    &lt;br /&gt;ספרו לאנשים שאתם חושבים שזה מעניין אותם על קבוצת הדיוור הזו, ועל הקהילה בכלל. מגיע לכולם להנות, לא?    &lt;br /&gt;&lt;b&gt;&lt;u&gt;אז איפה נרשמים&lt;/u&gt;?      &lt;br /&gt;&lt;/b&gt;בימים הקרובים נפרסם קישור להרשמה. שמרו על עין פקוחה והירשמו בהקדם (עם פרסום הקישור) כי מספר המקומות מוגבל בסופו של דבר.    &lt;br /&gt;&lt;b&gt;     &lt;br /&gt;&lt;/b&gt;אז למי שמגיע לכנס - נתראה שם, ולמי שלא - נתראה בפעם הבאה.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6971099" width="1" height="1" alt="" /&gt;</description></item><item><title>Alt.Heros – Shanselman, benscheirman</title><link>http://agileisrael.org/cs/blogs/royo/archive/2009/03/01/alt-heros-shanselman-benscheirman.aspx</link><pubDate>Sun, 01 Mar 2009 23:38:55 GMT</pubDate><guid isPermaLink="false">23a435e0-515b-467d-ba86-b6d13375d82b:2209</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;In case you didn’t realize this, whoever &lt;a href="http://www.hanselman.com/blog/"&gt;Scott Hanselman’s&lt;/a&gt; manager is = you should give Scott a raise. He just made &lt;a href="http://www.kyte.tv/shanselman"&gt;ALT.NET fun for people 6000 miles away&lt;/a&gt; using Kyte.com, a laptop and a buggy camera.&lt;/p&gt;  &lt;p&gt;Thanks for being an ALT.HERO Scott. And thanks Ben, &lt;a href="http://kyte.tv/benscheirman"&gt;who was doing the same in parallel sessions&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;That’s what I mean by “&lt;a href="http://weblogs.asp.net/rosherove/archive/2009/03/01/what-are-you-going-to-do-about-it.aspx"&gt;What are you going to do about it?&lt;/a&gt;”&lt;/p&gt;  &lt;p&gt;Also, &lt;a href="http://www.summerofnhibernate.com/"&gt;this is another great example&lt;/a&gt; of such thinking.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6934307" width="1" height="1" alt="" /&gt;</description></item><item><title>Two Faced Commits - how the ALT.NET Community is becoming more and more dogmatic</title><link>http://agileisrael.org/cs/blogs/royo/archive/2008/05/19/two-faced-commits-how-the-alt-net-community-is-becoming-more-and-more-dogmatic.aspx</link><pubDate>Mon, 19 May 2008 10:50:32 GMT</pubDate><guid isPermaLink="false">23a435e0-515b-467d-ba86-b6d13375d82b:1613</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;disclaimer: I work at Typemock. &lt;/p&gt;  &lt;p&gt;There is a big trend I am starting to notice in the &amp;quot;Advanced&amp;quot; unit testing community. That trend feels more and more like hypocrisy. Take &lt;a href="http://www.clariusconsulting.net/blogs/kzu/archive/2008/05/18/mock_statics_without_typemock.aspx"&gt;Daniel&amp;#39;s post about mocking statics without Typemock&lt;/a&gt;. (Daniel is the creator of &lt;a href="http://mockframeworks.com/moq"&gt;Moq&lt;/a&gt;, an open source mocking framework) Granted, it is important to know that you can always refactor things for testability, but just looks at what he writes:&lt;/p&gt;  &lt;p&gt;&amp;quot;So, don&amp;#39;t buy a product just because you&amp;#39;re lazy and want to avoid creating a few wrapper classes and interfaces&amp;quot;&lt;/p&gt;  &lt;p&gt;followed by&lt;/p&gt;  &lt;p&gt;&amp;quot;Always use the simplest thing that could possibly work.&amp;quot;&lt;/p&gt;  &lt;p&gt;Which is it, community? The idea of being prgamatic is using the right tool for the job. if that tools makes your job easier than not using it &amp;quot;cause you&amp;#39;re lazy otherwise&amp;quot; is plain old hypocrisy. &lt;/p&gt;  &lt;p&gt;The same argument also holds for tools like FinalBuilder vs. Nant\MsBuild\Other XML Hell. Tools don&amp;#39;t create problems if you use them correctly.&amp;#160; The community (especially the ALT.NET community) is going in a too extreme direction. so extreme that their advice are sometimes skewed too much to be considered pragmatic, sometimes falling into &amp;quot;dogmatic&amp;quot;. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;div id="disqus_thread"&gt;&lt;/div&gt;&lt;a href="http://iserializable.disqus.com/?url=ref"&gt;View the forum thread.&lt;/a&gt;&lt;a href="http://disqus.com" class="dsq-brlink"&gt;blog comments powered by &lt;span class="logo-disqus"&gt;Disqus&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6201193" width="1" height="1" alt="" /&gt;</description></item><item><title>The evolution of Unit Testing Syntax and Semantics</title><link>http://agileisrael.org/cs/blogs/royo/archive/2008/01/17/the-evolution-of-unit-testing-syntax-and-semantics.aspx</link><pubDate>Thu, 17 Jan 2008 11:21:59 GMT</pubDate><guid isPermaLink="false">23a435e0-515b-467d-ba86-b6d13375d82b:948</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;The semantics of how you write a unit test, the basic syntax, or Domain Specific language of how we write them, has been relatively stale for quite some years now.&amp;#160; But under the covers, the syntax revolution seems to be brewing, as people try to come up with newer, hopefully better and more readable syntaxes for tests and specifications that become more and more complex as the current Agile community struggles to accept best practices in this arena.&lt;/p&gt;  &lt;p&gt;I&amp;#39;m guilty of that too, but a recent post by Jeremy Miller prompted me to try and list all the different syntax variations I&amp;#39;ve come across in the .net and some in java world (not necessarily in chronological order). Most ofthese didn&amp;#39;t necessarily catch on as de facto standards, but are real world attempts to make a better world or explore new horizons.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;POUT (Plain Old Unit Test) Syntax&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;JUnit initial syntax&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Attributes:&lt;/strong&gt; NUnit with attribute syntax, removing inheritance and test naming requirements&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Extensibility&lt;/strong&gt;: MbUnit is extensible testing framework with lots of powerful attributes.&lt;/li&gt;    &lt;li&gt;&lt;a href="http://weblogs.asp.net/rosherove/archive/2005/04/03/TestNamingStandards.aspx"&gt;Naming conventions&lt;/a&gt; for unit tests seem to be something people are actively looking for.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Simplicity &lt;/strong&gt;is back: &lt;a href="http://www.codeplex.com/xunit"&gt;XUnit&lt;/a&gt; tries to go back to basics: No setup\teardown, different attribute names.&amp;#160;&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Fluent&lt;/strong&gt;: My implementation of &lt;a href="http://weblogs.asp.net/rosherove/archive/2008/01/09/scala-nrehersal-and-fluent-test-interfaces.aspx"&gt;NRehersal&lt;/a&gt; uses delegates and a more fluent interface for tests&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Mocking&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;Mocks Vs. Stubs&lt;/strong&gt;: The Difference is &lt;a href="http://martinfowler.com/articles/mocksArentStubs.html"&gt;explored&lt;/a&gt; (&lt;a href="http://martinfowler.com/articles/mocksArentStubs.html"&gt;here&lt;/a&gt; too) and makes its way into some of the mock frameworks (NMock, JMock, Rhino.Mocks)&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Explicit &lt;/strong&gt;(reflection based) mocking statements such as (New DynamicMock(typeof(Interface), mock.Expect(...))&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Record-replay &lt;/strong&gt;syntax from Rhino.Mocks, EasyMock, TypeMock and others&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;fluent mocking&lt;/strong&gt; APIs into our tests (&lt;a href="http://weblogs.asp.net/rosherove/archive/2005/06/18/413577.aspx"&gt;NMock2&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Auto Mocking &lt;/strong&gt;Containers (introduced by &lt;a href="http://blog.eleutian.com/CommentView,guid,762249da-e25a-4503-8f20-c6d59b1a69bc.aspx"&gt;Elutian&lt;/a&gt;) will use RhinoMocks and Ioc Containers under the test covers (back to base classes)&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Mocking the Un-Mockable&lt;/strong&gt;: &lt;a href="http://TypeMock.com"&gt;TypeMock&lt;/a&gt; (and &lt;a href="https://jmockit.dev.java.net/"&gt;JMockIt&lt;/a&gt; on the java side) introduce the possibility of mocking production code that is currently untestable without needing to refactor it.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;BDD, Specifications and other Domain Specific Languages&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Ruby &lt;a href="http://spec-unit.rubyforge.org/"&gt;SpecUnit&lt;/a&gt;, &lt;a href="http://dannorth.net/2007/06/introducing-rbehave"&gt;RBehave&lt;/a&gt; and &lt;a href="http://rspec.rubyforge.org/"&gt;RSpec&lt;/a&gt; make a dent in the .NET community and stuff start showing up in our world:&lt;/li&gt;    &lt;li&gt;Extension Methods: Scott bellware comes up with the idea of using &lt;a href="http://exceptionz.wordpress.com/2006/09/13/rspec-specifications-in-c/"&gt;C# 3.0 extension methods for an easier expectation syntax&lt;/a&gt;.&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/joe_ocampo/archive/2007/06/28/introducing-nunit-behave-or-insert-what-ever-other-catchy-name.aspx"&gt;NUnit.Behave&lt;/a&gt;, &lt;a href="http://nbehave.org/"&gt;NBehave&lt;/a&gt;, &lt;a href="http://nspec.tigris.org/"&gt;NSpec&lt;/a&gt; , &lt;a href="http://nspecify.sourceforge.net/"&gt;NSpecify&lt;/a&gt; try to use DSLs and fluent interfaces to express BDD specs.&lt;/li&gt;    &lt;li&gt;Jeremy &lt;a href="http://codebetter.com/blogs/jeremy.miller/archive/2008/01/17/spiking-a-new-syntax-for-integration-tests-whaddaya-think.aspx"&gt;shows off his version&lt;/a&gt; of a more fluent and natural spec syntax by taking the auto mocking container idea, using &lt;a href="http://structuremap.sourceforge.net/Default.htm"&gt;structuremap&lt;/a&gt; under the covers and creating something that tries to be much more declarative and understandable at the same time. He uses delegates a lot as well.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I&amp;#39;m probably forgetting a few here, so let me know in the comments.&lt;/p&gt;  &lt;p&gt;So, we see a nice evolution from beginner style to bdd and spec style. lots of work on the syntax is done, but there is currently lots of chaos. Think Blue-Day Vs. HD-DVD, only with about 5 main competitors. The nice thing about this: The community will decide what worls, so it would be interesting to see where we are one year or a two years from now in relation to this list!&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5612520" width="1" height="1" alt="" /&gt;</description></item><item><title>Data Layer Testing: Test Inheritance Patterns</title><link>http://agileisrael.org/cs/blogs/royo/archive/2007/11/28/data-layer-testing-test-inheritance-patterns.aspx</link><pubDate>Thu, 29 Nov 2007 01:56:51 GMT</pubDate><guid isPermaLink="false">23a435e0-515b-467d-ba86-b6d13375d82b:675</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;I&amp;#39;m preparing for my tutorial on Database and Data Layer unit testing that I will be giving at the Agile Practices Conference&amp;#160; next week. It&amp;#39;s always nice to have a full 3 hours to get pretty deep into something. 75 minutes just isn&amp;#39;t enough to grasp a concept deeply enough, just to graze it around the edges.&lt;/p&gt;  &lt;p&gt;When writing data layer tests, there are several patterns I&amp;#39;ve noticed, especially around the notion of inheritance within the test classes (Abstract test class pattern).&amp;#160; I&amp;#39;ve observed at least three different patterns emerging from inheritance that I&amp;#39;ve personally used, all relating to data layer testing, but could be used elsewhere:&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Abstract Utility Class&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/rosherove/WindowsLiveWriter/DataLayerTestingTestInheritancePatterns_3770/image_2.png"&gt;&lt;img style="border-right:0px;border-top:0px;margin:0px 10px 0px 0px;border-left:0px;border-bottom:0px;" height="243" alt="image" src="http://weblogs.asp.net/blogs/rosherove/WindowsLiveWriter/DataLayerTestingTestInheritancePatterns_3770/image_thumb.png" width="244" align="left" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; This class will usually be a base class for tests written for data layer objects. it would contain &amp;quot;facilities&amp;quot; such as database helper classes, setup and teardown methods that would automatically rollback any test and anything else a derived base class that was testing a data layer object would need (helper methods for asserting complex stuff, for example).&lt;/p&gt;  &lt;p&gt;This is a classic &amp;quot;Abstract test class&amp;quot; pattern, and the next two are built on top of it.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Template Test Class&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/rosherove/WindowsLiveWriter/DataLayerTestingTestInheritancePatterns_3770/image_4.png"&gt;&lt;img style="border-right:0px;border-top:0px;margin:0px 10px 0px 0px;border-left:0px;border-bottom:0px;" height="227" alt="image" src="http://weblogs.asp.net/blogs/rosherove/WindowsLiveWriter/DataLayerTestingTestInheritancePatterns_3770/image_thumb_1.png" width="244" align="left" border="0" /&gt;&lt;/a&gt;The template test class will contain &lt;em&gt;abstract&lt;/em&gt; methods as unit tests, which any derived class would have to override and perform. That means that if you are always testing the same things against a data layer object (insert returns different IDs, update works etc...) test authors on new data layer classes who derive from this class will never forget to implement at least these basic tests.&lt;/p&gt;  &lt;p&gt;they would also get the facilities for doing assertions and other things from the base class, as depicted in the previous pattern. makes sure you don&amp;#39;t forget tests, saves some time on the infrastructure.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Abstract Driver Test Class&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/rosherove/WindowsLiveWriter/DataLayerTestingTestInheritancePatterns_3770/image_6.png"&gt;&lt;img style="border-right:0px;border-top:0px;margin:0px 10px 0px 0px;border-left:0px;border-bottom:0px;" height="244" alt="image" src="http://weblogs.asp.net/blogs/rosherove/WindowsLiveWriter/DataLayerTestingTestInheritancePatterns_3770/image_thumb_2.png" width="228" align="left" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This class will have &lt;em&gt;non abstract&lt;/em&gt; test case methods inside it that will always run the same way. these test methods will call (using abstract methods) to the derived class&amp;#39; implementation of type specific actions (insert specific for a category, or update specific to person) .&lt;/p&gt;  &lt;p&gt;That leaves the derived class to only implement very basic things such as insert (and return the ID), update, or delete (by ID). the test methods in the base class will do the rest of the work. derived classes don&amp;#39;t need to implement any tests unless they want to add type specific tests which don&amp;#39;t belong on the base class.&lt;/p&gt;  &lt;p&gt;in the image to the left the green methods are tests that the base class runs, and the yellow ones are type specific helpers that the derived class has to implement.&lt;/p&gt;  &lt;p&gt;this makes writing tests for a new data layer object (as long as its interface is the same) very simple by inheriting a test class and implementing a few methods. all the test permutations in the base class will then run on the data layer object. saves lots of time and forgetting tests.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;What patterns have you come across?&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5369330" width="1" height="1" alt="" /&gt;</description></item><item><title>Mocking LINQ Queries, Extension methods and Anonymous Types</title><link>http://agileisrael.org/cs/blogs/royo/archive/2007/11/17/mocking-linq-queries-extension-methods-and-anonymous-types.aspx</link><pubDate>Sat, 17 Nov 2007 21:47:14 GMT</pubDate><guid isPermaLink="false">23a435e0-515b-467d-ba86-b6d13375d82b:649</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;One of the things I wanted to show at my Interactive session on unit testing tips and tricks at TechEd this year was how you can &amp;quot;Stub&amp;quot; out results from LINQ Queries, or mock\stub Extension methods in .NET 3.5 (&lt;a href="http://weblogs.asp.net/rosherove/archive/2007/09/16/mocks-and-stubs-the-difference-is-in-the-flow-of-information.aspx"&gt;what&amp;#39;s the difference&lt;/a&gt; between mocks and stubs?)&lt;/p&gt;  &lt;p&gt;The only mocking framework in existence that can truly stub out LINQ queries and extension methods is &lt;a href="http://www.TypeMock.com"&gt;TypeMock.NET&lt;/a&gt;.&amp;amp;#xA0; Another option, if you use LINQ to SQL, is to be able to mock out the DataContext and the IOrderedQueriable interface, &lt;a href="http://aabs.wordpress.com/2007/06/26/using-mock-objects-when-testing-linq-code/"&gt;as outlined here&lt;/a&gt;, to return a custom query result set.&amp;amp;#xA0; I&amp;#39;ll talk about the first option in this post, since it is much easier to read and understand. I may touch on the second one in a later post.&lt;/p&gt;  &lt;p&gt;TypeMock, I&amp;#39;ve &lt;a href="http://weblogs.asp.net/rosherove/archive/2006/09/27/TypeMock-has-a-blog.aspx"&gt;talked about&lt;/a&gt; it &lt;a href="http://weblogs.asp.net/rosherove/archive/2005/03/20/395261.aspx"&gt;before&lt;/a&gt;, is a very powerful mocking framework. much more so than Rhino Mocks or NMock, because it allows isolating static methods, private methods, constructors, and basically anything you can do in IL, because it uses the .NET Profiler APIs to intercept method calls and do whatever it wants with them.&amp;amp;#xA0; In that regard, it is almost &lt;strong&gt;too&lt;/strong&gt; powerful&lt;strong&gt; &lt;/strong&gt;because it rids of of the need to actually design your code for testability, and just test it as is (how you actually write the tests is another matter for another post).&lt;/p&gt;  &lt;p&gt;But I&amp;#39;d rather have the argument whether TypeMock is good or bad, than not have TypeMock on the scene at all, simply because it&amp;#39;s just too damn valuable as is (disclosure: TypeMock is owned by a friend of mine).&lt;/p&gt;  &lt;p&gt;It&amp;#39;s the only real framework that can deal with real untestable legacy code and still allow you to isolate classes enough to test them without changing the code under test itself.&lt;/p&gt;  &lt;p&gt;It&amp;#39;s the only framework that allows to write unit tests for code that is based on .NET 3.5 and uses LINQ Queries and extension methods, allowing to isolate these two types of code and thus be able to separate things from their dependencies.&lt;/p&gt;  &lt;p&gt;Here are some examples I wanted to show (takes fro the examples that come with the TypeMock download:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Example: Stubbing out LINQ Query Results&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;First, we&amp;#39;re going to create one fake result to return (array) from the LINQ query, and also introduce the real data source from qhich to query (realCustomerList). note that the customer list has 3 entries, and the fake list has only two entries.&lt;/p&gt;  &lt;pre class="csharpcode"&gt; &lt;span class="rem"&gt;///Two Customer instances used as fake values &lt;/span&gt;&lt;/pre&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;&lt;/span&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; Customer fakeCustomer1 = &lt;span class="kwrd"&gt;new&lt;/span&gt; Customer { Id = 0, Name = &lt;span class="str"&gt;&amp;quot;Fake1&amp;quot;&lt;/span&gt;, City = &lt;span class="str"&gt;&amp;quot;SF&amp;quot;&lt;/span&gt; };&lt;/pre&gt;

&lt;pre class="csharpcode"&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; Customer fakeCustomer2 = &lt;span class="kwrd"&gt;new&lt;/span&gt; Customer { Id = 1, Name = &lt;span class="str"&gt;&amp;quot;Fake2&amp;quot;&lt;/span&gt;, City = &lt;span class="str"&gt;&amp;quot;Redmond&amp;quot;&lt;/span&gt; }; &lt;span class="rem"&gt;/// A fake list used as return value in the tests&lt;/span&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; List&amp;lt;Customer&amp;gt; fakeCustomers = &lt;span class="kwrd"&gt;new&lt;/span&gt; List&amp;lt;Customer&amp;gt; {fakeCustomer1,fakeCustomer2 }; &lt;span class="rem"&gt;/// A list containing 3 cusotmer use as the &amp;quot;real data&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;private&lt;/span&gt; List&amp;lt;Customer&amp;gt; realCustomerList = &lt;span class="kwrd"&gt;new&lt;/span&gt; List&amp;lt;Customer&amp;gt; { &lt;span class="kwrd"&gt;new&lt;/span&gt; Customer{ Id = 1, Name=&lt;span class="str"&gt;&amp;quot;Dave&amp;quot;&lt;/span&gt;, City=&lt;span class="str"&gt;&amp;quot;Sarasota&amp;quot;&lt;/span&gt; }, &lt;span class="kwrd"&gt;new&lt;/span&gt; Customer{ Id = 2, Name=&lt;span class="str"&gt;&amp;quot;John&amp;quot;&lt;/span&gt;, City=&lt;span class="str"&gt;&amp;quot;Tampa&amp;quot;&lt;/span&gt; }, &lt;span class="kwrd"&gt;new&lt;/span&gt; Customer{ Id = 3, Name=&lt;span class="str"&gt;&amp;quot;Abe&amp;quot;&lt;/span&gt;, City=&lt;span class="str"&gt;&amp;quot;Miami&amp;quot;&lt;/span&gt; } };&lt;/pre&gt;

&lt;p&gt;Here&amp;#39;s how the unit test looks:&lt;/p&gt;

&lt;p&gt;&amp;amp;#xA0;&lt;/p&gt;

&lt;p&gt;&amp;amp;#xA0;&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre&gt;&lt;span class="lnum"&gt; 1: &lt;/span&gt;[TestMethod]&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 2: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; MockSimpleQuery()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 3: &lt;/span&gt; {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 4: &lt;/span&gt; &lt;span class="kwrd"&gt;using&lt;/span&gt; (RecordExpectations r = &lt;span class="kwrd"&gt;new&lt;/span&gt; RecordExpectations())&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 5: &lt;/span&gt; {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 6: &lt;/span&gt; var answer = from c &lt;span class="kwrd"&gt;in&lt;/span&gt; realCustomerList select c;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 7: &lt;/span&gt; r.Return(fakeCustomers);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 8: &lt;/span&gt; }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 9: &lt;/span&gt;&amp;amp;#xA0;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 10: &lt;/span&gt; var actual = from c &lt;span class="kwrd"&gt;in&lt;/span&gt; realCustomerList select c;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 11: &lt;/span&gt; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 12: &lt;/span&gt; Assert.AreEqual(2, actual.Count&amp;lt;Customer&amp;gt;());&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 13: &lt;/span&gt; Assert.IsTrue(actual.Contains(fakeCustomer1));&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 14: &lt;/span&gt; Assert.IsTrue(actual.Contains(fakeCustomer2));&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 15: &lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }

&lt;p&gt;&lt;strong&gt;Line 6 &lt;/strong&gt;is the one that tells the TypeMock record what LINQ query to intercept.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Line 7 &lt;/strong&gt;tells TypeMock what value to return when this query is intercepted. that means the query will never really take place. &lt;/p&gt;

&lt;p&gt;finally, we assert that what we got from the query is the fake list of customers. Pretty darn easy.&lt;/p&gt;

&lt;p&gt;&amp;amp;#xA0;&lt;/p&gt;

&lt;p&gt;But is this a good test? Not really. this is only a demo of what you code intercept with typeMock. a real unit test will actually test a piece of code that runs this query, and, instead of providing it with a list of objects to query, will just provide it with the fake return value to receive&lt;/p&gt;

&lt;p&gt;&amp;amp;#xA0;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Example: Test that an anonymous type is created correctly&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre&gt;&lt;span class="lnum"&gt; 1: &lt;/span&gt; [TestMethod]&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 2: &lt;/span&gt; [VerifyMocks]&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 3: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; MockAnonymousTypeTest()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 4: &lt;/span&gt; {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 5: &lt;/span&gt; &lt;span class="kwrd"&gt;using&lt;/span&gt; (RecordExpectations rec = &lt;span class="kwrd"&gt;new&lt;/span&gt; RecordExpectations())&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 6: &lt;/span&gt; {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 7: &lt;/span&gt; &lt;span class="rem"&gt;//Mock the creation of the Anonymous Type&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 8: &lt;/span&gt; var p1 = &lt;span class="kwrd"&gt;new&lt;/span&gt; { Name = &lt;span class="str"&gt;&amp;quot;A&amp;quot;&lt;/span&gt;, Price = 3 };&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 9: &lt;/span&gt; rec.CheckArguments(); &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 10: &lt;/span&gt;&amp;amp;#xA0;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 11: &lt;/span&gt; &lt;span class="rem"&gt;//fake the value of the Name Property&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 12: &lt;/span&gt; rec.ExpectAndReturn(p1.Name, &lt;span class="str"&gt;&amp;quot;John&amp;quot;&lt;/span&gt;);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 13: &lt;/span&gt; }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 14: &lt;/span&gt; &lt;span class="rem"&gt;//if creation will be done diffrently an exception will be thrown.&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 15: &lt;/span&gt; var target = &lt;span class="kwrd"&gt;new&lt;/span&gt; { Name = &lt;span class="str"&gt;&amp;quot;B&amp;quot;&lt;/span&gt;, Price = 3 };&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 16: &lt;/span&gt; &lt;span class="rem"&gt;//verify that the fake value is returned&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 17: &lt;/span&gt; Assert.AreEqual(&lt;span class="str"&gt;&amp;quot;John&amp;quot;&lt;/span&gt;, target.Name);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 18: &lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }

&lt;p&gt;&amp;amp;#xA0;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Line 8 &lt;/strong&gt;tells the typemock recorder that this is the anonymous type creation we&amp;#39;d like to intercept.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Line 9 &lt;/strong&gt;tell it to assert internally that the anonymous type is indeed created with the correct &amp;quot;Name&amp;quot; property value and the correct &amp;quot;Price&amp;quot; property value. so if I later initialize the anonymous type with the wrong values, I will get a test exception based on the expected values. Pretty neat.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Line 12 &lt;/strong&gt;is just an example of how you can also intercept and retun whatever value you&amp;#39;d like from the property of an anonymous type. in this case the name will always return &amp;quot;John&amp;quot; even though it may have been initialized differently.&lt;/p&gt;

&lt;p&gt;&amp;amp;#xA0;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Example: Mocking Extension Methods&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Extension methods are static methods, which means you can&amp;#39;t replace them with a different method instance. there are ways to design yoru code so that the calls to the static methods are testable, but assuming you&amp;#39;re testing code that cannot be changed, or that is hard to redesign, intercepting the method call itself is almost the only choice. &lt;/p&gt;

&lt;p&gt;assume you&amp;#39;ve extended the Point class by adding this extension method:&lt;/p&gt;

&lt;pre class="csharpcode"&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; Extend { &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; Point Multiply(&lt;span class="kwrd"&gt;this&lt;/span&gt; Point extendedInstance, &lt;span class="kwrd"&gt;int&lt;/span&gt; scalar) { extendedInstance.X *= scalar; extendedInstance.Y *= scalar; &lt;span class="kwrd"&gt;return&lt;/span&gt; extendedInstance; } }&lt;/pre&gt;

&lt;pre class="csharpcode"&gt;&amp;amp;#xA0;&lt;/pre&gt;

&lt;p&gt;Now you could write a test like this:&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre&gt;&lt;span class="lnum"&gt; 1: &lt;/span&gt; [TestMethod]&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 2: &lt;/span&gt; [VerifyMocks]&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 3: &lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; MockExtensionMethod()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 4: &lt;/span&gt; {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 5: &lt;/span&gt; &lt;span class="kwrd"&gt;using&lt;/span&gt; (RecordExpectations rec = &lt;span class="kwrd"&gt;new&lt;/span&gt; RecordExpectations())&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 6: &lt;/span&gt; {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 7: &lt;/span&gt; Point mocked = &lt;span class="kwrd"&gt;new&lt;/span&gt; Point(7, 9);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 8: &lt;/span&gt; mocked.Multiply(6);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 9: &lt;/span&gt; rec.Return(&lt;span class="kwrd"&gt;new&lt;/span&gt; Point(5, 5));&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 10: &lt;/span&gt; }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 11: &lt;/span&gt;&amp;amp;#xA0;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 12: &lt;/span&gt; Point target = &lt;span class="kwrd"&gt;new&lt;/span&gt; Point(7, 9);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 13: &lt;/span&gt; Point actual = target.Multiply(6);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 14: &lt;/span&gt;&amp;amp;#xA0;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 15: &lt;/span&gt; &lt;span class="rem"&gt;//Verify the returned vcalues&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 16: &lt;/span&gt; Assert.AreEqual(5, actual.X);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 17: &lt;/span&gt; Assert.AreEqual(5, actual.Y);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt; 18: &lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &amp;quot;Courier New&amp;quot;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }

&lt;p&gt;&amp;amp;#xA0;&lt;/p&gt;

&lt;p&gt;in line 7 we&amp;#39;re actually using the extension method as part of our recorder, and telling the record to return a specific value. then we later use that value in our code under test (like 13) and assert that we god the mocked value instead of the real one (the extension method is not executed).&lt;/p&gt;

&lt;p&gt;&amp;amp;#xA0;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What about other technologies?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;could you use this to test code that relies on other non testable technologies, like windows workflow, WCF etc? the answer is a big yes. the same principles apply, and most of these frameworks were not built with testability in mind. &lt;/p&gt;

&lt;p&gt;it&amp;#39;s in those cases where people ask &amp;quot;how can I test such code where everything is sealed, private and static?&amp;quot; that I tell them that, currently, TypeMock is the only framework that solves this problem at a satisfactory result.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5261344" width="1" height="1" alt="" /&gt;</description></item><item><title>Organization Problems - Sounds Familiar?</title><link>http://agileisrael.org/cs/blogs/royo/archive/2007/10/18/organization-problems-sounds-familiar.aspx</link><pubDate>Thu, 18 Oct 2007 13:08:03 GMT</pubDate><guid isPermaLink="false">23a435e0-515b-467d-ba86-b6d13375d82b:593</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;I just finished a summary of a company&amp;#39;s review about work modes and problems before we can start doing something about it. I&amp;#39;m posting part of it as anonymous because I think this seems to relate to many other companies out there:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&amp;quot;&lt;strong&gt;The QA Department&lt;/strong&gt; seems to be the main gripe of most of the departments in the company. The main issues are of it being staffed with personnel who does not really understand the application aspects of what they are testing, and so don’t really know &lt;b&gt;what&lt;/b&gt; to test in the application. Another main issue is the lack of knowledge about proper QA methods. Each QA department seems to be reinventing the wheel and creating its own methods. This also leads to the face that most tests are not automated and most tests don’t even get repeated for regressions after each release, which leads to an overall lower quality in the product. &lt;p&gt;... &lt;p&gt;&lt;strong&gt;The Marketing division&lt;/strong&gt;&amp;nbsp;seems to be a large source of problems. Most of these come from the fact that Marketing people also serve as Product Managers in the company (Those who should be truly representing the client’s real needs), setting feature priorities and agenda for the next release with ultimate decision power. Because there is a conflict of interest between the role of marketing and role of Product manager, many of the things that are requested from other departments such as Customer Support are considered haphazardly if at all, which leads to a product that contains features a real customer might not need, but misses features the customer really does need. Add in a true product manager role into the company can help alleviate many of these issues as well as the partial amount of time that marketing has of actually communicating with all relevant departments as a customer. &lt;p&gt;... &lt;p&gt;&lt;strong&gt;The X group&lt;/strong&gt; is highly motivated in implementing agile practices such as unit testing, and are suffering from lack of automation in the group, “islands” of knowledge and lack of code reviews.  &lt;p&gt;... &lt;p&gt;&lt;strong&gt;Management&lt;/strong&gt; has a big role in creating the current conditions for problems. The lack of CTO, and the fact that the CEO is the one who is “acting CEO” lead to lack of real technical leadership (lack of time to handle things) and no clear “head” to turn to and get quick good answers. Management can help by supporting practices such as unit testing and automation and getting and hiring good people into the missing roles in the company (Product managers, CTO) and by allowing for real time extensions to projects that would like to implement them.  &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;...&lt;/p&gt; &lt;p&gt;Generally speaking, there are various “pain points” that currently prohibit the departments from either getting the full data they need, influence the current releases so they contain the correct feature set or be more productive in their work. A main example is the big confusion about the various issue management software: which is reported to be almost unusable and there is no clear sync between that and X and Y issue management software also used in the other departments. Also the fact that developers aren’t really aware of what the application is used for in the field leads to believe that more time spent with the customer can help. Overall many “small” things can make for a large difference in the organization’s ability to create quality software and get better communication between the departments more quickly.&lt;/p&gt;&amp;quot;&lt;/blockquote&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=4622727" width="1" height="1" alt="" /&gt;</description></item><item><title>Database and data layer testing techniques at ALT.NET - slides and code</title><link>http://agileisrael.org/cs/blogs/royo/archive/2007/10/10/database-and-data-layer-testing-techniques-at-alt-net-slides-and-code.aspx</link><pubDate>Wed, 10 Oct 2007 10:39:36 GMT</pubDate><guid isPermaLink="false">23a435e0-515b-467d-ba86-b6d13375d82b:556</guid><dc:creator>Anonymous</dc:creator><description>&lt;p&gt;I contributed some material to the session about Database and data layer testing techniques at ALT.NET.&lt;/p&gt; &lt;p&gt;The slides and code I used at ALT.NET are the same ones I used at DevTeach, so &lt;a href="http://weblogs.asp.net/rosherove/archive/2007/05/15/slides-and-demos-for-talk-techniques-for-testing-data-access-code.aspx"&gt;you can download them here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=4515820" width="1" height="1" alt="" /&gt;</description></item></channel></rss>