<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://dotnet-forum.de/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>LINQ / Lambda and Testability issues</title><link>http://dotnet-forum.de/blogs/rainerhilmer/archive/2009/10/30/linq-lambda-and-testability-issues.aspx</link><description>Today was another time where I realized a drawback of LINQ Expressions (the same goes for Lambda). They are pretty as long as they represent a simple and straight forward functionality. If there’s a bug, it’s simple to find it but if the expression consists</description><dc:language /><generator>CommunityServer 2007.1 (Debug Build: 20917.1142)</generator><item><title>Lambda Expressions: Warum ich denke daß sie schnell gegen CCD –Prinzipien verstoßen</title><link>http://dotnet-forum.de/blogs/rainerhilmer/archive/2009/10/30/linq-lambda-and-testability-issues.aspx#32219</link><pubDate>Thu, 18 Feb 2010 12:16:11 GMT</pubDate><guid isPermaLink="false">6dcdb6ae-26a7-4704-ae8b-cbd278e59bdf:32219</guid><dc:creator>Rainer Hilmers Developer-Blog</dc:creator><description>&lt;p&gt;Oft wird mir etwas unwohl wenn ich eine Lambda expression sehe. Lange Zeit wu&amp;#223;te ich nur vage warum &amp;#252;berhaupt&lt;/p&gt;
&lt;img src="http://dotnet-forum.de/aggbug.aspx?PostID=32219" width="1" height="1"&gt;</description></item><item><title>Stripping down a convoluted LINQ expression</title><link>http://dotnet-forum.de/blogs/rainerhilmer/archive/2009/10/30/linq-lambda-and-testability-issues.aspx#6990</link><pubDate>Fri, 30 Oct 2009 19:45:10 GMT</pubDate><guid isPermaLink="false">6dcdb6ae-26a7-4704-ae8b-cbd278e59bdf:6990</guid><dc:creator>Rainer Hilmers Developer-Blog</dc:creator><description>&lt;p&gt;This is part 3 of my Blog posts about LINQ testability issues. You know what this is all about when you&lt;/p&gt;
&lt;img src="http://dotnet-forum.de/aggbug.aspx?PostID=6990" width="1" height="1"&gt;</description></item><item><title>re: LINQ / Lambda and Testability issues</title><link>http://dotnet-forum.de/blogs/rainerhilmer/archive/2009/10/30/linq-lambda-and-testability-issues.aspx#6988</link><pubDate>Fri, 30 Oct 2009 18:18:52 GMT</pubDate><guid isPermaLink="false">6dcdb6ae-26a7-4704-ae8b-cbd278e59bdf:6988</guid><dc:creator>Rainer Hilmer</dc:creator><description>&lt;p&gt;Hallo Rainer,&lt;/p&gt;
&lt;p&gt;genau das meinte ich mit &amp;quot;it’s better to split these into smaller pieces&amp;quot;. :-)&lt;/p&gt;
&lt;img src="http://dotnet-forum.de/aggbug.aspx?PostID=6988" width="1" height="1"&gt;</description></item><item><title>Testing a dismantled LINQ Expression</title><link>http://dotnet-forum.de/blogs/rainerhilmer/archive/2009/10/30/linq-lambda-and-testability-issues.aspx#6987</link><pubDate>Fri, 30 Oct 2009 16:52:59 GMT</pubDate><guid isPermaLink="false">6dcdb6ae-26a7-4704-ae8b-cbd278e59bdf:6987</guid><dc:creator>Rainer Hilmers Developer-Blog</dc:creator><description>&lt;p&gt;In my last Blog post I complained about my testability woes with LINQ expressions. Here are the test&lt;/p&gt;
&lt;img src="http://dotnet-forum.de/aggbug.aspx?PostID=6987" width="1" height="1"&gt;</description></item><item><title>re: LINQ / Lambda and Testability issues</title><link>http://dotnet-forum.de/blogs/rainerhilmer/archive/2009/10/30/linq-lambda-and-testability-issues.aspx#6985</link><pubDate>Fri, 30 Oct 2009 12:35:20 GMT</pubDate><guid isPermaLink="false">6dcdb6ae-26a7-4704-ae8b-cbd278e59bdf:6985</guid><dc:creator>Rainer Schuster</dc:creator><description>&lt;p&gt;hmmm... linq muss nicht kompliziert sein. habe den code mal umgeschrieben (ohne zu kompilieren, sollte aber funktioneren):&lt;/p&gt;
&lt;p&gt;var contractTypeMapping = (element) =&amp;gt; {&lt;/p&gt;
&lt;p&gt;		var contract = Type.GetType(mapping.Attribute(&amp;quot;contract&amp;quot;).Value);&lt;/p&gt;
&lt;p&gt;		var implementation = Type.GetType(mapping.Attribute(&amp;quot;type&amp;quot;).Value);&lt;/p&gt;
&lt;p&gt;		return new KeyValuePair&amp;lt;Type,Type&amp;gt;(contract,implementation);&lt;/p&gt;
&lt;p&gt;	};&lt;/p&gt;
&lt;p&gt;var configMappingElements = XElement.Load(file).Element(&amp;quot;mappings&amp;quot;).Elements(&amp;quot;mapping&amp;quot;);&lt;/p&gt;
&lt;p&gt;configMappingElements.Select( elem =&amp;gt; contractTypeMapping(mappingElement) );			 &amp;nbsp; &lt;/p&gt;
&lt;p&gt;var mappingsDict = mappings.ToDictionary( kvp =&amp;gt; kvp.Key, kvp =&amp;gt; kvp.Value);&lt;/p&gt;
&lt;img src="http://dotnet-forum.de/aggbug.aspx?PostID=6985" width="1" height="1"&gt;</description></item></channel></rss>