<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>eracer.de &#187; .NET</title> <atom:link href="http://www.eracer.de/tag/net/feed/" rel="self" type="application/rss+xml" /><link>http://www.eracer.de</link> <description>ASP.NET, Wordpress, HTML5, jQuery, Javascript, Ajax, Mobile</description> <lastBuildDate>Mon, 16 Jan 2012 08:54:40 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Visual Studio 2008: Sprache ändern</title><link>http://www.eracer.de/visual-studio-2008-sprache-andern/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-2008-sprache-andern</link> <comments>http://www.eracer.de/visual-studio-2008-sprache-andern/#comments</comments> <pubDate>Mon, 23 Mar 2009 09:51:06 +0000</pubDate> <dc:creator>Stevie</dc:creator> <category><![CDATA[Allgemein]]></category> <category><![CDATA[.NET]]></category> <category><![CDATA[Microsoft]]></category> <category><![CDATA[Sprache]]></category> <category><![CDATA[Visual Studio]]></category> <category><![CDATA[Visual Studio 2008]]></category><guid
isPermaLink="false">http://www.eracer.de/?p=118</guid> <description><![CDATA[Ich arbeite bereits seit gut 10 Jahren immer mit der Englischen Version der Entwicklungsumgebung Visual Studio von Microsoft. Vor kurzem habe ich auf meinem System die Developer Edition vom neuen SQL-Server 2008 installiert was auch ohne Probleme über die Bühne gegangen ist. Allerdings erstrahlte nach der Installation mein Visual Studio 2008 auch in Deutsch. Gnaaa. [...]]]></description> <content:encoded><![CDATA[<p>Ich arbeite bereits seit gut 10 Jahren immer mit der Englischen Version der Entwicklungsumgebung <a
class="zem_olink" href="http://en.wikipedia.org/wiki/Image:MSVisual_Studio.png" rel="lightbox[118]">Visual Studio</a> von Microsoft. Vor kurzem habe ich auf meinem System die Developer Edition vom neuen SQL-Server 2008 installiert was auch ohne Probleme über die Bühne gegangen ist. Allerdings erstrahlte nach der Installation mein Visual Studio 2008 auch in Deutsch. Gnaaa. Nach kurzer selbstständiger Suche ohne Google habe ich aber die Lösung gefunden. In Visual Studio 2008 geht man auf &#8220;Extras&#8221;-&gt;&#8221;Optionen&#8221;. Dort klickt man unten das Häckchen &#8220;Alle-Einstellungen anzeigen&#8221; danach geht man links im Menü auf &#8220;Umgebung&#8221; -&gt; &#8220;Internationale Einstellungen&#8221; und stellt die Sprach auf Englisch zurück. Das wars und alles ist wieder gut.</p><p
style="text-align: center;"><img
class="size-full wp-image-120 aligncenter" title="vs2008_change_language" src="http://www.eracer.de/wp-content/uploads/2009/03/vs2008_change_language.jpg" alt="vs2008_change_language" width="450" height="275" /></p> ]]></content:encoded> <wfw:commentRss>http://www.eracer.de/visual-studio-2008-sprache-andern/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>[.NET] HttpContext und UnitTests</title><link>http://www.eracer.de/net-httpcontext-und-unittests/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=net-httpcontext-und-unittests</link> <comments>http://www.eracer.de/net-httpcontext-und-unittests/#comments</comments> <pubDate>Tue, 17 Feb 2009 15:24:33 +0000</pubDate> <dc:creator>Stevie</dc:creator> <category><![CDATA[Allgemein]]></category> <category><![CDATA[.NET]]></category> <category><![CDATA[ASP.NET]]></category> <category><![CDATA[HttpContext]]></category> <category><![CDATA[UnitTest]]></category> <category><![CDATA[UnitTesting]]></category> <category><![CDATA[WebServices]]></category><guid
isPermaLink="false">http://www.eracer.de/?p=106</guid> <description><![CDATA[Da ich Unit Testing sehr mag und mehr oder weniger darauf angewiesen bin musste ich vor kurzem ein nerviges Problem lösen was vorallem des öfteren unter ASP.NET WebSites und WebServices auftritt. Verwendet man in einer Methode oder Funktion das Objekt &#8220;HttpContext&#8221; scheitert der UnitTest kläglich bzw. kann nicht weiter ausgeführt werden da in der UnitTest-Umgebung [...]]]></description> <content:encoded><![CDATA[<p>Da ich Unit Testing sehr mag und mehr oder weniger darauf angewiesen bin musste ich vor kurzem ein nerviges Problem lösen was vorallem des öfteren unter ASP.NET WebSites und WebServices auftritt. Verwendet man in einer Methode oder Funktion das Objekt &#8220;HttpContext&#8221; scheitert der UnitTest kläglich bzw. kann nicht weiter ausgeführt werden da in der UnitTest-Umgebung der HttpConext den Wert &#8220;null&#8221; hat. Nach ein wenig Googeln habe ich mir eine annehmbare Lösung gestrickt. Man simuliert einen HttpContext im Konstruktor der Testklasse und gaukelt somit der zu testenten Applikation einen HttpContext vor.</p><p>Hier das Code-Beispiel dafür, funktioniert bei mir einwandfrei. Der Inhalt der Variablen ist dabei relativ egal.</p><div
class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table
cellspacing="0" cellpadding="0"><tbody><tr><td
style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br
/>2<br
/>3<br
/>4<br
/>5<br
/>6<br
/>7<br
/>8<br
/>9<br
/>10<br
/>11<br
/>12<br
/>13<br
/>14<br
/></div></td><td><div
class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; <span
style="color: #0600FF; font-weight: bold;">public</span> <span
style="color: #6666cc; font-weight: bold;">class</span> IrgendwasTest<br
/> &nbsp; &nbsp; <span
style="color: #008000;">&#123;</span> &nbsp; &nbsp; &nbsp;<br
/> &nbsp; &nbsp; &nbsp; &nbsp; <span
style="color: #0600FF; font-weight: bold;">public</span> IrgendwasTest<span
style="color: #008000;">&#40;</span><span
style="color: #008000;">&#41;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; <span
style="color: #008000;">&#123;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span
style="color: #6666cc; font-weight: bold;">string</span> appVirtualDir <span
style="color: #008000;">=</span> <span
style="color: #666666;">&quot;/&quot;</span><span
style="color: #008000;">;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span
style="color: #6666cc; font-weight: bold;">string</span> appPhysicalDir <span
style="color: #008000;">=</span> <span
style="color: #666666;">@&quot;C:\Users\&quot;</span><span
style="color: #008000;">;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span
style="color: #6666cc; font-weight: bold;">string</span> page <span
style="color: #008000;">=</span> <span
style="color: #666666;">@&quot;localhost&quot;</span><span
style="color: #008000;">;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span
style="color: #6666cc; font-weight: bold;">string</span> query <span
style="color: #008000;">=</span> <span
style="color: #6666cc; font-weight: bold;">string</span><span
style="color: #008000;">.</span><span
style="color: #0000FF;">Empty</span><span
style="color: #008000;">;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TextWriter output <span
style="color: #008000;">=</span> <span
style="color: #0600FF; font-weight: bold;">null</span><span
style="color: #008000;">;</span> &nbsp; &nbsp; &nbsp; &nbsp;<br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SimpleWorkerRequest workerRequest <span
style="color: #008000;">=</span> <a
href="http://www.google.com/search?q=new+msdn.microsoft.com"><span
style="color: #008000;">new</span></a> SimpleWorkerRequest<span
style="color: #008000;">&#40;</span>appVirtualDir, appPhysicalDir, page, query, output<span
style="color: #008000;">&#41;</span><span
style="color: #008000;">;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HttpContext context <span
style="color: #008000;">=</span> <a
href="http://www.google.com/search?q=new+msdn.microsoft.com"><span
style="color: #008000;">new</span></a> HttpContext<span
style="color: #008000;">&#40;</span>workerRequest<span
style="color: #008000;">&#41;</span><span
style="color: #008000;">;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HttpContext<span
style="color: #008000;">.</span><span
style="color: #0000FF;">Current</span> <span
style="color: #008000;">=</span> context<span
style="color: #008000;">;</span><br
/> &nbsp; &nbsp; &nbsp; &nbsp; <span
style="color: #008000;">&#125;</span><br
/> <span
style="color: #008000;">&#125;</span></div></td></tr></tbody></table></div> ]]></content:encoded> <wfw:commentRss>http://www.eracer.de/net-httpcontext-und-unittests/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 9/19 queries in 0.005 seconds using disk: basic
Object Caching 461/473 objects using disk: basic

Served from: www.eracer.de @ 2012-02-05 17:36:28 -->
