<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Instantiating a WPF control from an NUnit test</title>
	<atom:link href="http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/</link>
	<description>Contextual Chameleon</description>
	<lastBuildDate>Sat, 17 Jul 2010 16:53:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: louis vuitton for sale</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-6949</link>
		<dc:creator>louis vuitton for sale</dc:creator>
		<pubDate>Wed, 07 Jul 2010 07:53:18 +0000</pubDate>
		<guid isPermaLink="false">#comment-6949</guid>
		<description>Well , the view of the passage is totally correct ,your details is really  reasonable and  you guy give us &lt;a href=&quot;http://www.salenewbalance.com/new-balance-1300.html&quot;  rel=&quot;nofollow&quot;&gt;new balance 1300&lt;/a&gt;   valuable  informative post, I totally agree the standpoint of upstairs. I often surfing on this forum when I m free and I find there are so much good information we can learn in this forum!</description>
		<content:encoded><![CDATA[<p>Well , the view of the passage is totally correct ,your details is really  reasonable and  you guy give us <a href="http://www.salenewbalance.com/new-balance-1300.html"  rel="nofollow">new balance 1300</a>   valuable  informative post, I totally agree the standpoint of upstairs. I often surfing on this forum when I m free and I find there are so much good information we can learn in this forum!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Andersson</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-6920</link>
		<dc:creator>Stefan Andersson</dc:creator>
		<pubDate>Mon, 07 Jun 2010 19:04:47 +0000</pubDate>
		<guid isPermaLink="false">#comment-6920</guid>
		<description>Chris,&lt;br&gt;&lt;br&gt;excellent post; it seems with R#5 JetBrains has flipped this, so the runner runs in MTA.</description>
		<content:encoded><![CDATA[<p>Chris,</p>
<p>excellent post; it seems with R#5 JetBrains has flipped this, so the runner runs in MTA.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Unit Test MsBuild Custom Task</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-6845</link>
		<dc:creator>Unit Test MsBuild Custom Task</dc:creator>
		<pubDate>Mon, 01 Feb 2010 04:35:44 +0000</pubDate>
		<guid isPermaLink="false">#comment-6845</guid>
		<description>[...] doesn&#039;t matter in this case. It is however annoying. I was able to make NUnit run in STA mode by creating a config file for the test assembly. NUnit has an attribute to set the apartment mode but this didn&#039;t seem to [...]</description>
		<content:encoded><![CDATA[<p>[...] doesn&#39;t matter in this case. It is however annoying. I was able to make NUnit run in STA mode by creating a config file for the test assembly. NUnit has an attribute to set the apartment mode but this didn&#39;t seem to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juan</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-6851</link>
		<dc:creator>Juan</dc:creator>
		<pubDate>Thu, 10 Dec 2009 01:38:21 +0000</pubDate>
		<guid isPermaLink="false">#comment-6851</guid>
		<description>Your CrossThreadTestRunner class worked perfectly! Thank you!</description>
		<content:encoded><![CDATA[<p>Your CrossThreadTestRunner class worked perfectly! Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-6564</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Thu, 27 Aug 2009 15:48:59 +0000</pubDate>
		<guid isPermaLink="false">#comment-6564</guid>
		<description>Works like a charm!  Thanks!</description>
		<content:encoded><![CDATA[<p>Works like a charm!  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brett</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-6293</link>
		<dc:creator>brett</dc:creator>
		<pubDate>Mon, 08 Jun 2009 15:49:50 +0000</pubDate>
		<guid isPermaLink="false">#comment-6293</guid>
		<description>Thanks a million finally found a solution to my problem. Where I kept having issues with the STA thread using different test runners.&lt;br&gt;&lt;br&gt;brett</description>
		<content:encoded><![CDATA[<p>Thanks a million finally found a solution to my problem. Where I kept having issues with the STA thread using different test runners.</p>
<p>brett</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sunit Joshi</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-5744</link>
		<dc:creator>Sunit Joshi</dc:creator>
		<pubDate>Thu, 16 Apr 2009 21:51:09 +0000</pubDate>
		<guid isPermaLink="false">#comment-5744</guid>
		<description>Thanks Chris...this helped me too. My failed tests were driving me nuts earlier !!</description>
		<content:encoded><![CDATA[<p>Thanks Chris&#8230;this helped me too. My failed tests were driving me nuts earlier !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Rice</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-3949</link>
		<dc:creator>Ben Rice</dc:creator>
		<pubDate>Thu, 05 Feb 2009 17:59:01 +0000</pubDate>
		<guid isPermaLink="false">#comment-3949</guid>
		<description>I&#039;ve had no luck reading a config file in my test project. 

For my dll ProjectTests.dll I created a file ProjectTests.config with the configuration you have above.  

I&#039;m testing:
Assert.AreEqual(&quot;STA&quot;, ConfigurationManager.AppSettings[&quot;ApartmentState&quot;]);  // fails, is null

In fact, Configuration.AppSettings has no keys at all.  Any ideas?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve had no luck reading a config file in my test project. </p>
<p>For my dll ProjectTests.dll I created a file ProjectTests.config with the configuration you have above.  </p>
<p>I&#8217;m testing:<br />
Assert.AreEqual(&#8220;STA&#8221;, ConfigurationManager.AppSettings["ApartmentState"]);  // fails, is null</p>
<p>In fact, Configuration.AppSettings has no keys at all.  Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: What's the best way to do WPF application unit test &#124; keyongtech</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-3767</link>
		<dc:creator>What's the best way to do WPF application unit test &#124; keyongtech</dc:creator>
		<pubDate>Thu, 22 Jan 2009 10:18:04 +0000</pubDate>
		<guid isPermaLink="false">#comment-3767</guid>
		<description>[...] as usual winforms PS: see there how to solve the issue with instantiating WPF controls from nunit http://www.hedgate.net/articles/2007...-an-nunit-test  --- WBR, Michael Nemtsev [.NET/C# MVP]. My blog: http://spaces.live.com/laflour Team blog: [...]</description>
		<content:encoded><![CDATA[<p>[...] as usual winforms PS: see there how to solve the issue with instantiating WPF controls from nunit <a href="http://www.hedgate.net/articles/2007...-an-nunit-test" rel="nofollow">http://www.hedgate.net/articles/2007&#8230;-an-nunit-test</a>  &#8212; WBR, Michael Nemtsev [.NET/C# MVP]. My blog: <a href="http://spaces.live.com/laflour" rel="nofollow">http://spaces.live.com/laflour</a> Team blog: [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-3264</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Thu, 11 Dec 2008 11:01:31 +0000</pubDate>
		<guid isPermaLink="false">#comment-3264</guid>
		<description>Unfortunately, the plugin I was using for showing code nicely made all xml-tags lowercase, which broke the config file I include in the post. I have now edited it, so it looks like JohnD recommends above (and how it would have looked if not for that plugin...), so now it should work better.</description>
		<content:encoded><![CDATA[<p>Unfortunately, the plugin I was using for showing code nicely made all xml-tags lowercase, which broke the config file I include in the post. I have now edited it, so it looks like JohnD recommends above (and how it would have looked if not for that plugin&#8230;), so now it should work better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-1859</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Fri, 05 Sep 2008 14:16:36 +0000</pubDate>
		<guid isPermaLink="false">#comment-1859</guid>
		<description>Hey Chris,
You have a bunch of UPPERCASE stuff in those samples that breaks them.  Any chance of editing them to work correctly?</description>
		<content:encoded><![CDATA[<p>Hey Chris,<br />
You have a bunch of UPPERCASE stuff in those samples that breaks them.  Any chance of editing them to work correctly?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-1849</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 05 Sep 2008 06:30:33 +0000</pubDate>
		<guid isPermaLink="false">#comment-1849</guid>
		<description>Hi Drew,

I am not quite sure what you mean by configuring Resharper? You could of course create a template to avoid having to write the boiler-plate code manually each time, but maybe you are referring to something else?</description>
		<content:encoded><![CDATA[<p>Hi Drew,</p>
<p>I am not quite sure what you mean by configuring Resharper? You could of course create a template to avoid having to write the boiler-plate code manually each time, but maybe you are referring to something else?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drew</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-1616</link>
		<dc:creator>Drew</dc:creator>
		<pubDate>Fri, 29 Aug 2008 06:49:47 +0000</pubDate>
		<guid isPermaLink="false">#comment-1616</guid>
		<description>Hi Chris,

I was wondering if you are aware of a way of configuring resharper to use these settings?

Cheers,
Drew</description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>I was wondering if you are aware of a way of configuring resharper to use these settings?</p>
<p>Cheers,<br />
Drew</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yingqiang Woo</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-974</link>
		<dc:creator>Yingqiang Woo</dc:creator>
		<pubDate>Tue, 26 Feb 2008 08:19:56 +0000</pubDate>
		<guid isPermaLink="false">#comment-974</guid>
		<description>hi,JohnD
could you send me the config file, wuyq101 @ gmail.com.
Thank you very much.
i am using Nunit 2.4.3, i just can&#039;t get it work.</description>
		<content:encoded><![CDATA[<p>hi,JohnD<br />
could you send me the config file, wuyq101 @ gmail.com.<br />
Thank you very much.<br />
i am using Nunit 2.4.3, i just can&#8217;t get it work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-843</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 05 Feb 2008 14:44:15 +0000</pubDate>
		<guid isPermaLink="false">#comment-843</guid>
		<description>John, thanks for sharing that information. Hope it helps others in the same situation.</description>
		<content:encoded><![CDATA[<p>John, thanks for sharing that information. Hope it helps others in the same situation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JohnD</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-776</link>
		<dc:creator>JohnD</dc:creator>
		<pubDate>Thu, 24 Jan 2008 22:54:34 +0000</pubDate>
		<guid isPermaLink="false">#comment-776</guid>
		<description>Hey! 

The XML I put in the last post didn&#039;t show up. So, I&#039;ll describe what I had to do:
1. Create a config file for the test project or test DLL. Making the changes in NUnit&#039;s main config file didn&#039;t get the job done.
2. NUnit is case sensitive so the XML names must be NUnit and TestRunner rather than nunit and testrunner.
3. The setting of NUnit/TestRunner must be within the configuration tag rather than outside it as shown in the original example.

When set up like that, Nunit 2.4.6 runs WPF tests just fine!
Good luck!
JohnD</description>
		<content:encoded><![CDATA[<p>Hey! </p>
<p>The XML I put in the last post didn&#8217;t show up. So, I&#8217;ll describe what I had to do:<br />
1. Create a config file for the test project or test DLL. Making the changes in NUnit&#8217;s main config file didn&#8217;t get the job done.<br />
2. NUnit is case sensitive so the XML names must be NUnit and TestRunner rather than nunit and testrunner.<br />
3. The setting of NUnit/TestRunner must be within the configuration tag rather than outside it as shown in the original example.</p>
<p>When set up like that, Nunit 2.4.6 runs WPF tests just fine!<br />
Good luck!<br />
JohnD</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JohnD</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-775</link>
		<dc:creator>JohnD</dc:creator>
		<pubDate>Thu, 24 Jan 2008 22:43:02 +0000</pubDate>
		<guid isPermaLink="false">#comment-775</guid>
		<description>The following test project config file gets the job done for NUnit 2.4.6



	
		
			
		
	

  
		
			&lt;!-- Valid values are STA,MTA. Others ignored. --&gt;
			
		
	
</description>
		<content:encoded><![CDATA[<p>The following test project config file gets the job done for NUnit 2.4.6</p>
<p>			<!-- Valid values are STA,MTA. Others ignored. --></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JohnD</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-771</link>
		<dc:creator>JohnD</dc:creator>
		<pubDate>Wed, 23 Jan 2008 22:05:12 +0000</pubDate>
		<guid isPermaLink="false">#comment-771</guid>
		<description>Hey Chris,

What version of NUnit are you using? I tried your technique to run all tests as STA with NUnit 2.4.6 and had no luck at all! Are we using different versions of NUnit or is there some magic setting that I failed to set appropriately? Here are the details behind my questions:

When I set up the config file as you showed in the example, nunit-console complained that there were two root elements and pointed at the  line.

I moved the  section inside the  section and NUnit complained that sectiongroup was an unrecognized token. I removed the  stuff  and ended up with:

...
    
	
        
    
...



...


At this point, nunit-console could successfully parse the config file but all the tests failed with the System.InvalidOperationException indicating that the config file changes were not having the desired result. 

Same sort of thing happened with the GUI test runner. 

Thanks for any help
John</description>
		<content:encoded><![CDATA[<p>Hey Chris,</p>
<p>What version of NUnit are you using? I tried your technique to run all tests as STA with NUnit 2.4.6 and had no luck at all! Are we using different versions of NUnit or is there some magic setting that I failed to set appropriately? Here are the details behind my questions:</p>
<p>When I set up the config file as you showed in the example, nunit-console complained that there were two root elements and pointed at the  line.</p>
<p>I moved the  section inside the  section and NUnit complained that sectiongroup was an unrecognized token. I removed the  stuff  and ended up with:</p>
<p>&#8230;</p>
<p>&#8230;</p>
<p>&#8230;</p>
<p>At this point, nunit-console could successfully parse the config file but all the tests failed with the System.InvalidOperationException indicating that the config file changes were not having the desired result. </p>
<p>Same sort of thing happened with the GUI test runner. </p>
<p>Thanks for any help<br />
John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Finzer</title>
		<link>http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test/comment-page-1/#comment-95</link>
		<dc:creator>Greg Finzer</dc:creator>
		<pubDate>Fri, 28 Sep 2007 16:37:48 +0000</pubDate>
		<guid isPermaLink="false">#comment-95</guid>
		<description>Chris, thanks for creating this article.  I have recently created an NUnit Test Generator.  What do you think would be useful features for interacting with WPF for the test generator?

http://www.kellermansoftware.com/p-30-nunit-test-generator.aspx</description>
		<content:encoded><![CDATA[<p>Chris, thanks for creating this article.  I have recently created an NUnit Test Generator.  What do you think would be useful features for interacting with WPF for the test generator?</p>
<p><a href="http://www.kellermansoftware.com/p-30-nunit-test-generator.aspx" rel="nofollow">http://www.kellermansoftware.com/p-30-nunit-test-generator.aspx</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
