<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>BDD With MSTest</title><link>http://blogs.msdn.com/b/elee/archive/2009/01/20/bdd-with-mstest.aspx</link><description>Update: this blog is no longer active. For new posts and RSS subscriptions, please go to http://saintgimp.org . 
 In my previous post I mentioned that I was writing BDD-style unit tests in the standard MSTest environment that&amp;rsquo;s part of Visual Studio</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: BDD With MSTest</title><link>http://blogs.msdn.com/b/elee/archive/2009/01/20/bdd-with-mstest.aspx#10004297</link><pubDate>Thu, 29 Apr 2010 04:40:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10004297</guid><dc:creator>kyle bailey</dc:creator><description>&lt;p&gt;Great article! I definetly am picking up a few pointers as I'm trying to put all of this BDD stuff together.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10004297" width="1" height="1"&gt;</description></item><item><title>re: BDD With MSTest</title><link>http://blogs.msdn.com/b/elee/archive/2009/01/20/bdd-with-mstest.aspx#9988989</link><pubDate>Thu, 01 Apr 2010 16:56:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9988989</guid><dc:creator>SaintGimp</dc:creator><description>&lt;p&gt;@Rodd: The TestContext property is optional but can provide some useful features for certain kinds of tests. &amp;nbsp;Basically, if your test class has this property then MSTest will set it for you before the tests run and you can use it for various purposes. &amp;nbsp;If you don't need to use the TestContext class in your tests then you don't need that property and field. &amp;nbsp;See this link: &lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/ms404699"&gt;http://msdn.microsoft.com/en-us/library/ms404699&lt;/a&gt;(VS.90).aspx&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9988989" width="1" height="1"&gt;</description></item><item><title>re: BDD With MSTest</title><link>http://blogs.msdn.com/b/elee/archive/2009/01/20/bdd-with-mstest.aspx#9988885</link><pubDate>Thu, 01 Apr 2010 14:18:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9988885</guid><dc:creator>Rodd Harris</dc:creator><description>&lt;p&gt;Thanks Eric. &amp;nbsp;I'm new to this stuff (and to the .Net community) and this has been realy helpful.&lt;/p&gt;
&lt;p&gt;I do have one question. &amp;nbsp;It's not a problem but more that I want to make sure I'm not missing something here. &amp;nbsp;In your ContextSpecification class, you define TestContext property and the testContextInstance field. &amp;nbsp;However, it doesn't look like they're ever used. &amp;nbsp;Is that correct?&lt;/p&gt;
&lt;p&gt;If so, why define them at all -- or are they required to exists for MSTest to be happy?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9988885" width="1" height="1"&gt;</description></item><item><title>re: BDD With MSTest</title><link>http://blogs.msdn.com/b/elee/archive/2009/01/20/bdd-with-mstest.aspx#9903175</link><pubDate>Mon, 05 Oct 2009 14:09:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9903175</guid><dc:creator>Kim Stevens</dc:creator><description>&lt;p&gt;Thanks Eric! I've modified my approach after reading those - much happier now :-)&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://kimstevens.posterous.com/testing-exceptions-with-bdd-style-mstest-take"&gt;http://kimstevens.posterous.com/testing-exceptions-with-bdd-style-mstest-take&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9903175" width="1" height="1"&gt;</description></item><item><title>re: BDD With MSTest</title><link>http://blogs.msdn.com/b/elee/archive/2009/01/20/bdd-with-mstest.aspx#9900365</link><pubDate>Mon, 28 Sep 2009 20:47:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9900365</guid><dc:creator>SaintGimp</dc:creator><description>&lt;p&gt;I use pretty much the same technique as you described in your blog (see these posts of mine: &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/elee/archive/2009/01/25/bdd-specification-extensions.aspx"&gt;http://blogs.msdn.com/elee/archive/2009/01/25/bdd-specification-extensions.aspx&lt;/a&gt; and &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/elee/archive/2009/01/25/handling-exception-in-bdd-style-tests.aspx"&gt;http://blogs.msdn.com/elee/archive/2009/01/25/handling-exception-in-bdd-style-tests.aspx&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;It's certainly more verbose than the attribute approach but it fits better with the separation in the BDD style and more importantly, it's explicit about what should cause the exception. &amp;nbsp;With the attribute the test will pass if *anything* throws the expected exception, even something you weren't trying to test.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9900365" width="1" height="1"&gt;</description></item><item><title>re: BDD With MSTest</title><link>http://blogs.msdn.com/b/elee/archive/2009/01/20/bdd-with-mstest.aspx#9900175</link><pubDate>Mon, 28 Sep 2009 11:38:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9900175</guid><dc:creator>Kim Stevens</dc:creator><description>&lt;p&gt;@Eric I've been playing around with a way to test exceptions using your approach and without using the ExpectedExceptionAttribute - &amp;nbsp;&lt;a rel="nofollow" target="_new" href="http://kimstevens.posterous.com/testing-exceptions-with-bdd-style-mstest"&gt;http://kimstevens.posterous.com/testing-exceptions-with-bdd-style-mstest&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Have you discovered a better way?&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Kim&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9900175" width="1" height="1"&gt;</description></item><item><title>Eric Lee : BDD With MSTest</title><link>http://blogs.msdn.com/b/elee/archive/2009/01/20/bdd-with-mstest.aspx#9372817</link><pubDate>Fri, 23 Jan 2009 19:31:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9372817</guid><dc:creator>DotNetShoutout</dc:creator><description>&lt;p&gt;Thank you for submitting this cool story - Trackback from DotNetShoutout&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9372817" width="1" height="1"&gt;</description></item><item><title>Reflective Perspective - Chris Alcock  &amp;raquo; The Morning Brew #269</title><link>http://blogs.msdn.com/b/elee/archive/2009/01/20/bdd-with-mstest.aspx#9355983</link><pubDate>Wed, 21 Jan 2009 11:24:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9355983</guid><dc:creator>Reflective Perspective - Chris Alcock  &amp;raquo; The Morning Brew #269</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://blog.cwa.me.uk/2009/01/21/the-morning-brew-269/"&gt;http://blog.cwa.me.uk/2009/01/21/the-morning-brew-269/&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9355983" width="1" height="1"&gt;</description></item></channel></rss>