<?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>Dude, where is my Kaizen? &#187; BDD</title>
	<atom:link href="http://www.bjoernrochel.de/tag/bdd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bjoernrochel.de</link>
	<description>Björn Rochel&#039;s weblog</description>
	<lastBuildDate>Mon, 21 Jun 2010 07:26:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>AutoMocking in xUnit.BDDExtensions</title>
		<link>http://www.bjoernrochel.de/2009/01/26/automocking-in-xunitbddextensions/</link>
		<comments>http://www.bjoernrochel.de/2009/01/26/automocking-in-xunitbddextensions/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 14:33:59 +0000</pubDate>
		<dc:creator>BjRo</dc:creator>
				<category><![CDATA[BDD]]></category>
		<category><![CDATA[xUnit]]></category>
		<category><![CDATA[xUnit.BDDExtensions]]></category>

		<guid isPermaLink="false">http://www.bjoernrochel.de/?p=248</guid>
		<description><![CDATA[
	public class when_an_automatically_resolved_instance_with_a_single_dependency_is_used_in_a_fixture :
		InstanceContextSpecification&#60;ClassWithSingleDependency&#62;
	{
		private object actualResult;
		private IDependency dependency;
		private object expectedResult;

		protected override void EstablishContext()
		{
			expectedResult = new object();
			dependency = AutoDependency&#60;IDependency&#62;();
			dependency.WhenToldTo(x =&#62; x.Invoke()).Return(expectedResult);
		}

		protected override void Because()
		{
			actualResult = Sut.Invoke();
		}

		[Observation]
		public void should_be_able_to_verify_calls_made_to_the_dependency()
		{
			dependency.WasToldTo(x =&#62; x.Invoke());
		}

		[Observation]
		public void should_execute_the_configured_behavior_on_the_dependency()
		{
			actualResult.ShouldBeEqualTo(expectedResult);
		}
	}


This little feature was added to the trunk today. Yes, no CreateSut() call. You can omit it for most of the simple scenarios. You can [...]]]></description>
			<content:encoded><![CDATA[<pre class="brush: csharp">
	public class when_an_automatically_resolved_instance_with_a_single_dependency_is_used_in_a_fixture :
		InstanceContextSpecification&lt;ClassWithSingleDependency&gt;
	{
		private object actualResult;
		private IDependency dependency;
		private object expectedResult;

		protected override void EstablishContext()
		{
			expectedResult = new object();
			dependency = AutoDependency&lt;IDependency&gt;();
			dependency.WhenToldTo(x =&gt; x.Invoke()).Return(expectedResult);
		}

		protected override void Because()
		{
			actualResult = Sut.Invoke();
		}

		[Observation]
		public void should_be_able_to_verify_calls_made_to_the_dependency()
		{
			dependency.WasToldTo(x =&gt; x.Invoke());
		}

		[Observation]
		public void should_execute_the_configured_behavior_on_the_dependency()
		{
			actualResult.ShouldBeEqualTo(expectedResult);
		}
	}
</pre>
<p />
This little feature was added to the trunk today. Yes, no CreateSut() call. You can omit it for most of the simple scenarios. You can still override it, if you need/have to. It uses the AutoMocking capabilities of StructureMap internally. </p>
<p>I&#8217;m going to merge the different involved assemblies to a single assembly soon in order to make deployment a bit easier . . . </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bjoernrochel.de/2009/01/26/automocking-in-xunitbddextensions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why Should you?</title>
		<link>http://www.bjoernrochel.de/2009/01/23/why-should-you/</link>
		<comments>http://www.bjoernrochel.de/2009/01/23/why-should-you/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 15:36:17 +0000</pubDate>
		<dc:creator>BjRo</dc:creator>
				<category><![CDATA[BDD]]></category>

		<guid isPermaLink="false">http://www.bjoernrochel.de/?p=245</guid>
		<description><![CDATA[What&#8217;s the importance of Should in BDD? Why isn&#8217;t it called Must, Need to or Will?  It&#8217;s one of those subtle psychological things . . .
The main reason Dan North decided to use Should instead of all other  possibilities is, that Should implies that you can always question the behavior of your system. It isn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s the importance of <em>Should </em>in BDD? Why isn&#8217;t it called <em>Must</em>, <em>Need to</em> or <em>Will</em>?  It&#8217;s one of those subtle psychological things . . .</p>
<p>The main reason Dan North decided to use <em>Should </em>instead of all other  possibilities is, that <em>Should </em>implies that you can always question the behavior of your system. It isn&#8217;t written in stone. If you think the system doesn&#8217;t behave correctly any more, feel free to change or drop the particular spec.</p>
<p>I found this little comment of Dan North worth remembering . . .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bjoernrochel.de/2009/01/23/why-should-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wording in BDD specs</title>
		<link>http://www.bjoernrochel.de/2009/01/23/wording-in-bdd-specs/</link>
		<comments>http://www.bjoernrochel.de/2009/01/23/wording-in-bdd-specs/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 15:26:48 +0000</pubDate>
		<dc:creator>BjRo</dc:creator>
				<category><![CDATA[BDD]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[xUnit.BDDExtensions]]></category>

		<guid isPermaLink="false">http://www.bjoernrochel.de/?p=221</guid>
		<description><![CDATA[Last week I had a little discussion on the german ALT.net mailing list in which I commented on a code example of a spec that wording in a BDD spec is of vital importance to BDD and therefore should be chosen very carefully. With this post I would like to clarify a bit what I [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I had a little discussion on the german ALT.net mailing list in which I commented on a code example of a spec that <strong>wording in a BDD spec is of vital importance to BDD and therefore should be chosen very carefully</strong>. With this post I would like to clarify a bit what I meant with that.Â  I&#8217;d like to add that I still consider myself to be a learner in the BDD area. So, if you see things differently, feel free to comment.</p>
<p>Let&#8217;s start by looking back on my own efforts with testing and BDD. For about 2 years I wrote (what I consider to be) classical unit tests. Those tests followed strictly a &#8220;&lt;MethodName&gt;_&lt;Scenario&gt;_&lt;Behavior&gt;&#8221; naming convention originally proposed by Roy Osherove. Here&#8217;s short example of what I wrote that time.</p>
<pre class="brush: csharp">
[Fact]
public void RegisterSubscriber_NewSubscriber_SubscriberIsRegistered()
{
    var subscriber = new FakeSubscriber();

    subscriptionManager.RegisterSubscriber(subsriber);

    var wasRegistered = subscriptionManger
                                     .AllSubscriptionsFor()
                                     .Contains(subscriber);

    Assert.TruewasRegistered);
}
</pre>
<p>When changing my tests to a more BDD oriented style last august (if you&#8217;re interested why please read <a href="http://www.bjoernrochel.de/2008/08/27/first-steps-with-bdd/" target="_blank">here</a>), my style of writing tests changed to something that looked like this.</p>
<pre class="brush: csharp">
[Concern(typeof(SubscriptionManager))]
public class When_registering_a_subscriber_at_the_subscription_manager : InstanceContextSpecification
{
    ISubscriber subscriber;

    protected override void EstablishContext()
    {
        subscriber = new FakeSubscriber();
    }

    protected override SubscriptionManager CreateSut()
    {
        return new SubscriptionManager();
    }     

    protected override void Because()
    {
        Sut.RegisterSubscriber(subscriber);
    }

    [Observation]
    public void should_be_contained_in_the_list_of_subscriptions_for_the_subscribed_message()
    {
        subscriptionManger
           .AllSubscriptionsFor()
           .ShouldContain(subscriber);
    }
}
</pre>
<p>For me at that particular point BDD meant not much more than a bunch of proven practices in test design and a revised naming convention. So what might be wrong with the way the spec is written here (event in that context)?</p>
<ol>
<li>It isn&#8217;t fully refactoring safe (to be fair, the classic unit test shown above wasn&#8217;t either). Try to rename the term SubscriptionManager (or RegisterSubscriber in the first example). No refactoring tool will help you renaming your existing specs. As a consequence I would strongly suggest <strong>not to encode type or member names into a specification</strong>.</li>
<li>It doesn describe behavior. It describes implementation. A spec should describe what a system under test is supposed to do, not how it achives it.Â  Do you see the word &#8220;list&#8221; here?</li>
</ol>
<p>You could revise the spec like this.</p>
<pre class="brush: csharp">
[Concern(typeof(SubscriptionManager))]
public class When_registering_a_new_subscriber : InstanceContextSpecification
{
    ISubscriber subscriber;

    protected override void EstablishContext()
    {
        subscriber = new FakeSubscriber();
    }

    protected override SubscriptionManager CreateSut()
    {
        return new SubscriptionManager();
    }     

    protected override void Because()
    {
        Sut.RegisterSubscriber(subscriber);
    }

    [Observation]
    public void should_enable_the_subscriber_to_recieve_messages_he_is_interested_in()
    {
        subscriptionManger
           .AllSubscriptionsFor()
           .ShouldContain(subscriber);
    }
}
</pre>
<p><strong>Having said this, IS THAT THE REASON why I consider wording be to so important to BDD?</strong></p>
<p>No, not really. Nearly the same applies to classic unit testing, too.Â  We should take a closer look at BDD in order to reach the answer.</p>
<p><strong>Was the example shown above even BDD? </strong></p>
<p>IMHO Second no. The example isn&#8217;t BDD. It only shows a way how a part of BDD can be implemented, with a framework; be it xunit.bddextensions, SpecUnit, MSpec or any other tool out there.</p>
<p><strong>Ahm, ok what is BDD then?</strong></p>
<p>As I understand it so far, BDD was originally created to codify acceptance criterias of stakeholders into executable code in a way which preseverves most/all of the vocabulary the stakeholder uses. By that a shared language can be established between stakeholders.Â  (Greg Young wrote a nice post about the <a href="http://codebetter.com/blogs/gregyoung/archive/2007/10/16/bdd-and-the-shared-language.aspx" target="_self">subtle difference between BDDs shared language and DDDs ubiquitous language</a>, so I won&#8217;t repeat that here).Â  This shared language is ment to enhance the way different parties/stakeholders interact with each other, a way to enhance communication. And what is the primary utility used in the interactions between stakeholders in BDD? ==&gt; The executable specifications. &lt;==</p>
<p><strong>Coming back to why wording is so important to BDD</strong></p>
<p>What is especially interesting in BDD is, that as there&#8217;re different stakeholders, <a href="http://codebetter.com/blogs/aaron.jensen/archive/2008/10/19/bdd-consider-your-audience.aspx" target="_blank">there&#8217;re also different kind of audiences, with possibly different kind of vocabulary</a>.Â  So because BDD specs are targeted to be an acceptance criteria, they need to be written in the vocabulary of the people who will review them. This is a huge influenceÂ  besides all the more technical reasons I touched earlier which of course are relevant, too.</p>
<p>Does this make sense to you?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bjoernrochel.de/2009/01/23/wording-in-bdd-specs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A new syntax for xUnit.BDDExtensions ???</title>
		<link>http://www.bjoernrochel.de/2008/11/27/a-new-syntax-for-xunitbddextensions/</link>
		<comments>http://www.bjoernrochel.de/2008/11/27/a-new-syntax-for-xunitbddextensions/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 13:21:51 +0000</pubDate>
		<dc:creator>BjRo</dc:creator>
				<category><![CDATA[BDD]]></category>
		<category><![CDATA[xUnit]]></category>
		<category><![CDATA[xUnit.BDDExtensions]]></category>

		<guid isPermaLink="false">http://www.bjoernrochel.de/2008/11/27/a-new-syntax-for-xunitbddextensions/</guid>
		<description><![CDATA[I&#8217;ve been doing BDD with the &#8220;context/specificationt&#8221;- style for about 4 months now.  Examples for this style are MSpec, NSpec or my little framework called xUnit.BDDExtensions.
What bothers me lately is that this style mixes context and behavior under test into one fixture class name, which can be extremely long because of that.  An [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing BDD with the &#8220;<a href="http://www.lostechies.com/blogs/colinjack/archive/2008/11/19/context-specification-available-frameworks-bdd.aspx" target="_blank">context/specification</a>t&#8221;- style for about 4 months now.  Examples for this style are <a href="http://codebetter.com/blogs/aaron.jensen/archive/2008/09/02/mspec-v0-2.aspx" target="_blank">MSpec</a>, <a href="http://nspec.tigris.org/" target="_blank">NSpec</a> or my little framework called <a href="http://code.google.com/p/xunitbddextensions/" target="_blank">xUnit.BDDExtensions</a>.</p>
<p>What bothers me lately is that this style mixes context and behavior under test into one fixture class name, which can be extremely long because of that.  An example to clarify what I mean:</p>
<pre class="brush: csharp"> public class When_adding_a_contact_to_a_user_with_no_existing_contacts { }
 </pre>
<p>&#8220;Adding a contact&#8221; is the observed behavior in the context of &#8220;no existing contacts&#8221;. I believe<br />
this should be more obvious, which made me thinking of how a syntax for this could look like.</p>
<p>Having said that, here is what I came up with. It&#8217;s heavily inspired by MSpec and <a href="http://dannorth.net/2007/06/introducing-rbehave" target="_blank">RBehave</a>.</p>
<pre class="brush: csharp">
[SpecificationFor(typeof(PatientService))]
public class A_patient_with_a_missing_first_name_is_not_allowed_to_be_persisted
{
      Given a_patient_with_a_missing_first_name = () =&gt;
      {
      };

      When trying_to_save_the_patient = () =&gt;
      {
      };

      It should_not_persist_the_supplied_patient = () =&gt;
      {
      };

      It should_return_a_report_indicating_that_the_patients_first_name_is_required = () =&gt;
      {
      };
}
</pre>
<p>A generated report for this code might look like this: </p>
<p><strong><span style="underline;">Specifications for &#8220;PatientService&#8221;</span></strong></p>
<ul>
<li><strong>A patient with a missing first name is not allowed to be persisted</strong>
<ul>
<li><strong>Given a patient transfer object with a missing first name</strong></li>
<li><strong>when trying to save the patient</strong>
<ul>
<li><strong>it should not persist the supplied patient</strong></li>
<li><strong>it should return a report indicating that the patients first name is required<br />
</strong></li>
</ul>
</li>
</ul>
</li>
</ul>
<p>I&#8217;m still not 100% happy with this, because there is some sort of duplication between the fixture name and the &#8220;givens&#8221; (at least in the shown example), but with this approach you</p>
<ol>
<li>are able to separate context and behavior in a clean way,</li>
<li>can describe the context very fine grained (by having multiple &#8220;givens&#8221;)</li>
<li>and besides that it looks cool <img src='http://www.bjoernrochel.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
</ol>
<p>I would like to hear opinions on that. Is this something worth implementing / adding to xUnit.BDDExtensions?<br />
Or am I off the track with this?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bjoernrochel.de/2008/11/27/a-new-syntax-for-xunitbddextensions/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Introducing xUnit.BDDExtensions</title>
		<link>http://www.bjoernrochel.de/2008/10/04/introducing-xunitbddextensions/</link>
		<comments>http://www.bjoernrochel.de/2008/10/04/introducing-xunitbddextensions/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 11:28:31 +0000</pubDate>
		<dc:creator>BjRo</dc:creator>
				<category><![CDATA[BDD]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[xUnit]]></category>
		<category><![CDATA[xUnit.BDDExtensions]]></category>

		<guid isPermaLink="false">http://www.bjoernrochel.de/?p=143</guid>
		<description><![CDATA[
xUnit.BDDExtensions is a little framework build on top of xUnit which enables a BDD style of testing with xUnit.
Besides an emphasis on a &#8220;test case class per fixture&#8221; organization scheme for tests, AAA (Arrange, Act and Assert) style of writing tests and left to right assertions, this framework also provides Rhino.Mocks integration out of the [...]]]></description>
			<content:encoded><![CDATA[<div style="0pt 3em 1.2em 0pt;">
<p>xUnit.BDDExtensions is a little framework build on top of xUnit which enables a BDD style of testing with xUnit.</p>
<p>Besides an emphasis on a &#8220;test case class per fixture&#8221; organization scheme for tests, AAA (Arrange, Act and Assert) style of writing tests and left to right assertions, this framework also provides Rhino.Mocks integration out of the box. By hiding the mechanics of Rhino.Mocks (record and replay model, mocks vs. stubs)  behind the scenes, xUnit.BDDExtensions also helps on writing cleaner, easier to understand and less brittle tests</p>
<p>xUnit.BDDExtensions is based on JP Boodhoos BDD extensions for MBUnit used in his &#8220;Nothing but .NET&#8221; bootcamps.</p>
<p><b>Enough of the talking, let&#8217;s look at some code</b></p>
<p>This is actual code of the xUnit.BDDExtensions trunk. The <em>SpecificationTestCommand </em>class serves as a kind of adapter inside xUnit. It enables the test class to have methods that are run before and after the actual test method is executed.* </p>
<pre class="brush: csharp">
    public class SpecificationTestCommand : BeforeAfterCommand
    {
        public SpecificationTestCommand(
            ITestCommand innerCommand,
            MethodInfo testMethod)
            : base(innerCommand, testMethod)
        {
        }

        public override MethodResult Execute(object testClass)
        {
            var specification = testClass as ITestSpecification;

            try
            {

                if (specification == null)
                {
                    throw new InvalidOperationException(
                          &quot;Instance does not implement ITestSpecification&quot;);
                }

                specification.InitializeSpecification();
                return base.Execute(testClass);
            }
            finally
            {
                if (specification != null)
                {
                    specification.CleanupSpecification();
                }
            }
        }
    }
</pre>
<p>Notice several things: </p>
<ol>
<li>It expects the instance to implement <em>ITestSpecification</em>.</li>
<li>It calls the <em>InitializeSpecification()</em> method on it </li>
<li>Passes the execution to the inner command (in <em>base.Execute(obj)</em>) </li>
<li>and finally cleans up the specification by calling <em>CleanupSpecification() </em>on it.</li>
</ol>
<p>So how can a completely isolated happy path test for this look like?</p>
<pre class="brush: csharp">
 [Concern(typeof(SpecificationTestCommand))]
 public class when_a_specification_test_command_is_executed_on_a_ITestSpecification_implementer :
        concern_for_specification_test_command
    {
        private MethodResult expectedTestResult;
        private ITestCommand innerCommand;
        private MethodInfo methodInfo;
        private MethodResult testResult;
        private ITestSpecification testSpecification;

        protected override void EstablishContext()
        {
            innerCommand = Dependency();
            testSpecification = Dependency();
            methodInfo = GetTestMethodHandle();
            expectedTestResult = CreateMethodResult(methodInfo);

            innerCommand.WhenToldTo(x =&gt; x.Execute(testSpecification))
                     .Return(expectedTestResult);
        }

        protected override SpecificationTestCommand CreateSut()
        {
            return new SpecificationTestCommand(innerCommand, methodInfo);
        }

        protected override void Because()
        {
            testResult = Sut.Execute(testSpecification);
        }

        [Observation]
        public void should_ask_the_test_specification_to_initialize()
        {
            testSpecification.WasToldTo(x =&gt; x.InitializeSpecification());
        }

        [Observation]
        public void should_pass_the_test_specification_to_the_inner_test_command()
        {
            innerCommand.WasToldTo(x =&gt; x.Execute(testSpecification));
        }

        [Observation]
        public void should_return_the_test_result_from_the_inner_test_command()
        {
            testResult.ShouldBeEqualTo(expectedTestResult);
        }

        [Observation]
        public void should_ask_the_test_specification_to_cleanup()
        {
            testSpecification.WasToldTo(x =&gt; x.CleanupSpecification());
        }
    }
</pre>
<p>Notice several things:</p>
<ol>
<li>
       In the <em>EstablishContext()</em> method the whole context for the test is created.  This includes creating most of the dependencies with Rhino.Mocks through <em>Dependeny()</em> and the necessary configuration of their behavior. This is done in order to quickly get from an interaction based style of testing to a state based style of testing. In AAA terms this method implements the Arrange part.
   </li>
<li> The <em>CreateSut()</em> method is executed after <em>EstablishContext()</em> and creates the actual system under test.</li>
<li> The <em>Because()</em> method implements the actual behavior under test. In AAA terms this is the Act part. In the current example this meant executing the test command with an instance implementing the expected interface.</li>
<li> Each method marked with the <em>ObservationAttribute</em> contains a single observation which should be fulfilled when the test has been executed. In AAA terms every Observation is an Assert.</li>
</ol>
<p>That&#8217;s basically it. Pretty straight forward imho. If I managed to make you at least a bit curious about this style of testing, you can grab the source with any Subversion client from:</p>
<p><tt><strong><em>http</em></strong>://xunitbddextensions.googlecode.com/svn/trunk/<br />
</tt></div>
<p>Enjoy coding</p>
<p>*<br />
I know xUnit dropped this behavior in favor of the dispose pattern, but having explicit, non technically named methods for that still seems more natural in the context of BDD to me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bjoernrochel.de/2008/10/04/introducing-xunitbddextensions/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>BDD and xUnit continued</title>
		<link>http://www.bjoernrochel.de/2008/09/16/bdd-and-xunit-continued/</link>
		<comments>http://www.bjoernrochel.de/2008/09/16/bdd-and-xunit-continued/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 18:00:55 +0000</pubDate>
		<dc:creator>BjRo</dc:creator>
				<category><![CDATA[BDD]]></category>
		<category><![CDATA[xUnit]]></category>

		<guid isPermaLink="false">http://www.bjoernrochel.de/?p=123</guid>
		<description><![CDATA[Because of several requests I uploaded the little BDD extension I recently wrote for xunit.  It&#8217;s basically a port of the framework JP Boodhoos currently uses in his famous Nothing but .Net bootcamps (he&#8217;s using MbUnit).
So here it is. Any feedback is appreciated . . .
]]></description>
			<content:encoded><![CDATA[<p>Because of several requests I uploaded the little BDD extension I recently wrote for xunit.  It&#8217;s basically a port of the framework JP Boodhoos currently uses in his famous Nothing but .Net bootcamps (he&#8217;s using MbUnit).</p>
<p>So <a href="http://www.bjoernrochel.de/wp-content/uploads/2008/09/xunitbddextensions.zip">here</a> it is. Any feedback is appreciated . . .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bjoernrochel.de/2008/09/16/bdd-and-xunit-continued/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BDD, xUnit and Resharper</title>
		<link>http://www.bjoernrochel.de/2008/09/02/bdd-xunit-and-resharper/</link>
		<comments>http://www.bjoernrochel.de/2008/09/02/bdd-xunit-and-resharper/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 16:01:19 +0000</pubDate>
		<dc:creator>BjRo</dc:creator>
				<category><![CDATA[BDD]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[xUnit]]></category>
		<category><![CDATA[Resharper]]></category>

		<guid isPermaLink="false">http://www.bjoernrochel.de/?p=111</guid>
		<description><![CDATA[Yesterday was an interesting evening. I tried to pinpoint the problem between the little BDD framework I used and the Resharper addin for xUnit.
A short description of my problem
I&#8217;m using a test-case-class-per-fixture organization and the template method pattern for writing tests in the AAA scheme. Besides that I use a specialized FactAttribute in order to [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday was an interesting evening. I tried to pinpoint the problem between the little BDD framework I used and the Resharper addin for xUnit.</p>
<p><strong>A short description of my problem</strong></p>
<p>I&#8217;m using a test-case-class-per-fixture organization and the template method pattern for writing tests in the AAA scheme. Besides that I use a specialized <em>FactAttribute </em>in order to invoke my AAA &#8211; hook methods in the correct order. All of this is residing in a separate assembly.</p>
<p>When I use the build-in FactAttribute to mark my tests alll tests are discovered by the Resharper&#8217;s TestExplorer, but when I&#8217;m using my own marker attributes nothing is discovered.</p>
<p><strong>What seems to be the problem </strong></p>
<p>It took me some time to find out what was actually going on. I&#8217;ve never debugged a Resharper-Plugin before.  <a href="http://www.jetbrains.net/confluence/display/ReSharper/Building,+running+and+debugging+plugin" target="_blank">This</a> helped a lot. It was an interesting experience, though. Didn&#8217;t knew that there is so much going on behind the scenes. This is what I found out:</p>
<ul>
<li>The XUnitTestProvider class is responsible for discovering tests.</li>
<li> It skips all assemblies which don&#8217;t reference xunit directly.</li>
</ul>
<p>Hm, I had a reference to xunit in my test library project settings. However I was not referencing xUnit stuff from my code directly (Own FactAttribute and  xunitext35 extension methods for assertions). That&#8217;s when it hit me:</p>
<p>My problem was probably caused by a compiler optimization. It seems that all unused assembly references are removed when building the test assembly. A look into reflector supported my thesis. So my test assembly has no direct reference to the xunit.dll, only an indirect one through the BDD framework.</p>
<p><strong>Patching this is quite easy</strong></p>
<p>This is the original method:</p>
<pre class="brush: csharp">
static bool IsTestAssembly(IMetadataAssembly assembly)
{
        foreach (AssemblyReference reference in assembly.ReferencedAssembliesNames)
               if (reference.AssemblyName.Name.ToLowerInvariant() == &quot;xunit&quot;)
                     return true;

        return false;
}
</pre>
<p>When changing this a bit to this, everything runs as expected. </p>
<pre class="brush: csharp">
static bool IsTestAssembly(IMetadataAssembly assembly)
{
        foreach (AssemblyReference reference in assembly.ReferencedAssembliesNames)
        {
              string assemblyName = reference.AssemblyName.Name.ToLowerInvariant();

              if (assemblyName.StartsWith(&quot;xunit&quot;))
                   return true;
       }

       return false;
}
</pre>
<p>All tests are discovered and I&#8217;m quite happy that I can use BDD, XUnit and Resharper in combination <img src='http://www.bjoernrochel.de/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>One thing to be aware of: In order to get the tests not only discovered but also executed in Resharper you&#8217;ll have make sure that your test project and the Resharper addin are both using the same, exact version of xUnit. I stumbled over this after I recompiled and installed my patch on my machine. Resharper is not able to execute the tests in case of a version mismatch.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bjoernrochel.de/2008/09/02/bdd-xunit-and-resharper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>BDD with Xunit</title>
		<link>http://www.bjoernrochel.de/2008/08/28/bdd-with-xunit/</link>
		<comments>http://www.bjoernrochel.de/2008/08/28/bdd-with-xunit/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 09:53:06 +0000</pubDate>
		<dc:creator>BjRo</dc:creator>
				<category><![CDATA[BDD]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[xUnit]]></category>

		<guid isPermaLink="false">http://www.bjoernrochel.de/?p=100</guid>
		<description><![CDATA[My current tool of interest is XUnit. For those of you who haven&#8217;t heard of it it&#8217;s a relatively new unit testing framework from Brad Wilson and the original author of NUnit 2.0, James Newkirk. You can find it here.
Some of the things I really like about it:

It has a set of .NET 3.0 Extension [...]]]></description>
			<content:encoded><![CDATA[<p>My current tool of interest is XUnit. For those of you who haven&#8217;t heard of it it&#8217;s a relatively new unit testing framework from Brad Wilson and the original author of NUnit 2.0, James Newkirk. You can find it <a href="http://www.codeplex.com/xunit" target="_blank">here</a>.</p>
<p>Some of the things I really like about it:</p>
<ul>
<li>It has a set of .NET 3.0 Extension methods, which can be used instead of classic assertions (f.e.: &#8220;Foo&#8221;.ShouldNotBeNull() )</li>
<li>It runs every every test on a separated instance.</li>
<li>It uses the constructor of the test class and the Dispose-pattern for fixture initialization and release of resources after a test.</li>
<li>It&#8217;s relatively easy to extend XUnit.</li>
</ul>
<p>Because of curiosity and my current affection with BDD I decided to port the BDDExtension stuff fromÂ  JP Boodhoo to XUnit. So here we go:</p>
<p><strong>Marking specifications with concerns<br />
</strong></p>
<p>All specifications for a particular type are marked with the <em>ConcernAttribute</em>.Â  This is only a marker attribute by which a tool like <em>bddunit </em>is able to correlate specifications and their related type.</p>
<pre class="brush: csharp">
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public class ConcernAttribute : TraitAttribute
{
        private readonly Type _Type;

        public ConcernAttribute(Type type) : base(&quot;Concern&quot;, type.FullName)
        {
                _Type = type;
        }

        public Type Type
        {
                get { return _Type; }
        }
}
</pre>
<p>The <em>ConcernAttibute </em>extends the <em>TraitAttribute </em>which is described in the documentation as &#8220;an Attribute used to decorate a test method with arbitrary name/value pairs (&#8220;traits&#8221;).&#8221; I changed the <em>AttributeTarget </em>from method to class in order to suit my needs.</p>
<p><strong>Changing the way the test is executed</strong></p>
<p>JP&#8217;s original code relied on the SetUp and Teaddown handlers of NUnit / MBUnit which are execute before and after each test method in the same class. Since XUnit doesn&#8217;t have that feature any more we&#8217;ll have to extend it a bit.</p>
<p>The main extension point for how a test is executed is the <em>FactAttibute </em>used to mark a method as a test. You can extend it and return a different <em>ITestCommand </em>which is then used to execute the test.</p>
<pre class="brush: csharp">
public class ObservationAttribute : FactAttribute
{
        protected override IEnumerable EnumerateTestCommands(MethodInfo method)
        {
                var testCommand = base.EnumerateTestCommands(method).First();
                yield return new SpecificationTestCommand(testCommand, method);
        }
}
</pre>
<p>Do you wonder why the method returns an <em>IEnumerable&lt;ITestCommand&gt;</em>? This is done in order to support something like row tests in MBUnit. The XUnit framework basically enables you to run a test several times. For me this isn&#8217;t interesting so I just grabbed the first <em>ITestCommand </em>from it and wrapped it with my own implementation, which looks like this:</p>
<pre class="brush: csharp">
public class SpecificationTestCommand : BeforeAfterCommand
{
        public SpecificationTestCommand(
                ITestCommand innerCommand,
                MethodInfo testMethod)
                : base(innerCommand, testMethod)
        {
        }

        public override MethodResult Execute(object testClass)
        {
                var specification = testClass as IContextSpecification;

                if (specification == null)
                {
                       throw new InvalidOperationException(
                          &quot;Instance does not implement IContextSpecification&quot;);
                }

                try
                {
                        specification.EstablishContext();
                        specification.Because();
                        return base.Execute(testClass);
                }
                catch(AssertException)
                {
                        throw;
                }
                catch (Exception exception)
                {
                        ExceptionUtility.RethrowWithNoStackTraceLoss(exception.InnerException);
                }

                return null;
        }
}
</pre>
<p>The code requires the test class to implement the <em>IContextSpecification </em>interface in order to invoke the <em>EstablishContext()</em> and <em>Because()</em> methods for doing AAA based tests. (Do you miss AfterEachSpec? One moment please <img src='http://www.bjoernrochel.de/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ) For every interface there is a base class which is in my case the <em>ContextSpecification</em> class.</p>
<pre class="brush: csharp">
public abstract class ContextSpecification : IContextSpecification, IDisposable
{
      protected abstract void Because();

      protected abstract void EstablishContext();

      protected virtual void AfterEachSpec()
      {
      }

      #region IContextSpecification Members

      void IContextSpecification.Because()
      {
            Because();
      }

      void IContextSpecification.EstablishContext()
      {
            EstablishContext();
      }

      #endregion

      #region IDisposable Members

      public void Dispose()
      {
            AfterEachSpec();
      }

      #endregion
}
</pre>
<p>Notice some things.<em> AfterEachSpec()</em> is called from <em>Dispose()</em>, That&#8217;s why I didn&#8217;t need to include it into the <em>IContextSpecification</em> interface. That interface is implemented explicitly in order to allow the hooks to have different modifiers (protected).</p>
<p><strong>A first test</strong></p>
<p>There&#8217;s always an interesting moment when you first run your little experiment. Here we go:</p>
<pre class="brush: csharp">
[Concern(typeof(Factory))]
public class When_creating_product_with_a_valid_name : ContextSpecification
{
      private Factory _Factory;
      private Product _CreatedProduct;

      protected override void EstablishContext()
      {
            _Factory = new Factory();
      }

      protected override void Because()
      {
            _CreatedProduct = _Factory.Create(&quot;Foo&quot;);
      }

      [Observation]
      public void The_product_should_contain_the_correct_name()
      {
            _CreatedProduct.Name.ShouldEqual(&quot;Foo&quot;);
      }

      [Observation]
      public void The_product_should_contain_the_correct_vendor_name()
      {
            _CreatedProduct.VendorName.ShouldEqual(&quot;FooVendor&quot;);
      }
}
</pre>
<p>And the result from TestDriven.NET is:</p>
<p>&#8212;&#8212; Test started: Assembly: Xunit.BddExtensions.Samples.dll &#8212;&#8212;<br />
2 passed, 0 failed, 0 skipped, took 0,92 seconds.</p>
<p><strong>Conclusions</strong></p>
<p>It&#8217;s in fact very easy to extend XUnit. I like the tool even more after doing this little research. The shown code runs smoothly with TestDriven.NET. However the Resharper &#8211; TestRunner seems to have problems with it (TestExplorer stays blank).</p>
<p>I&#8217;ll play with that approach in the next few weeks and will blog about my experience with both XUnit and BDD. So if you&#8217;re interested in more stay tuned . . .</p>
<p>P.s.: If you&#8217;re interested in the code, just drop me a line . . .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bjoernrochel.de/2008/08/28/bdd-with-xunit/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>First steps with BDD</title>
		<link>http://www.bjoernrochel.de/2008/08/27/first-steps-with-bdd/</link>
		<comments>http://www.bjoernrochel.de/2008/08/27/first-steps-with-bdd/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 11:35:06 +0000</pubDate>
		<dc:creator>BjRo</dc:creator>
				<category><![CDATA[BDD]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Domain Specific Languages]]></category>
		<category><![CDATA[MbUnit]]></category>
		<category><![CDATA[NUnit]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.bjoernrochel.de/?p=79</guid>
		<description><![CDATA[One of the positive things of being ill and staying at home is having time to look into stuff I always wanted to look into but never actually had the time to. A good example for this is Behavior Driven Development or in short BDD.
BDD is described by its creator Dan North as an enhancement [...]]]></description>
			<content:encoded><![CDATA[<p>One of the positive things of being ill and staying at home is having time to look into stuff I always wanted to look into but never actually had the time to. A good example for this is Behavior Driven Development or in short BDD.</p>
<p>BDD is described by its creator Dan North as an enhancement to classic TDD with an emphasis on behavior specifications. It tries to provide business value by using classes and methods written as human readable sentences which can be reflected in order to generate a behavior specification document for the classes under test. The document can fulfill multiple purposes. It could be used as documentation for the tested system and even more important as an enabler for the ubiquitous language of the project (in terms of Evans DDD).</p>
<p>Before looking at something more concrete about BDD, first a brief history of my personal experience with testing throughout the last 3 years. I think this helps me to clarify, why I liked BDD from the moment I started reading about it.</p>
<p>My first unit tests looked very much like a lot of tests I&#8217;ve seen from a lot of people starting with unit tests since. (The examples are using the NUnit syntax but you can project this to any unit testing framework you want.)</p>
<p><strong>Every fresh start is hard.</strong></p>
<pre class="brush: csharp">
[TestFixture]
public class FactoryTest
{
    private Factory _Factory;

    [SetUp]
    public void SetUp()
    {
          _Factory = new Factory();
    }

    [Test]
    public void Test1()
    {
           SomeProduct product = _Factory.Create(&quot;FooProduct&quot;);

           Assert.IsNotNull(product);
           Assert.AreEqual(product.Name, &quot;FooProduct&quot;);
           Assert.AreEqual(product.Vendor, &quot;Foo&quot;);
    }

    [Test]
    [ExpectedException(typeof(ArgumentNullException))]
    public void Test2()
    {
           _Factory.Create(null);
    }
}
</pre>
<p>For every class I wanted to test I wrote a corresponding test class, which had the suffix &#8220;Test&#8221; and contained all tests for that class under test. I discovered later that this is a testing strategy known as TEST-CASE-CLASS-PER-CLASS while reading &#8220;XUnit Test Patterns&#8221; by Gerard Meszaros. At that time it felt pretty confident with what I did. I mean, I wrote tested code, which was to a particular degree bug free. Yeah right, but let&#8217;s have a look at the downside of what I was doing:</p>
<ul>
<li>When such a test failed I didn&#8217;t have a clue what the test was actually verifying. I had to debug the testcode.</li>
<li>When a test like &#8220;Test1&#8243; failed I didn&#8217;t know what assertion was broken. I had to debug the testcode. </li>
<li>It didn&#8217;t scale well. I became quite messy and unclear as the number of tests increased.</li>
<li>I always hat a hard time coming back to the test after having spend days in a different topic.</li>
</ul>
<p><strong>Incorporating a standard naming scheme for tests</strong></p>
<p>As one result of the observed problems I incorporated a standard naming scheme (inspired by a post of Roy Osherove) to my tests which followed the following scheme:</p>
<p>MethodName_Scenario_Behavior</p>
<p>Applied to the sample code it would look like this:</p>
<pre class="brush: csharp">
[TestFixture]
public class FactoryTest
{
    private Factory _Factory;

    [SetUp]
    public void SetUp()
    {
          _Factory = new Factory();
    }

    [Test]
    public void Create_ValidCreationData_CreatesAValidProduct()
    {
           SomeProduct product = _Factory.Create(&quot;FooProduct&quot;);

           Assert.IsNotNull(product);
           Assert.AreEqual(product.Name, &quot;FooProduct&quot;);
           Assert.AreEqual(product.Vendor, &quot;Foo&quot;);
    }

    [Test]
    [ExpectedException(typeof(ArgumentNullException))]
    public void Create_NullForArgument_ThrowsArgumentNullException()
    {
           _Factory.Create(null);
    }
}
</pre>
<p>The naming scheme helped me a lot for maintaining my tests. When a test failed I knew instantly a) which class was tested, b) what the test scenario was and c) what the expected behavior was, that was broken. However, the problem with the multiple assertions still existed. You can fix this issue by providing error messages with every assertion. I must admit that I never really liked that approach. I would rather go down the SINGLE-ASSERTION-PER-TEST-METHOD way. This way you have the behavior of the class under test completely discoverable by a unit test framework which is something I appreciate. (Maybe I&#8217;m alone with this. Several members of my team disagree with this.)</p>
<p><strong>Single Assertion per Test</strong></p>
<p>After refactoring the test it would look like this:</p>
<pre class="brush: csharp">
[TestFixture]
public class FactoryTest
{
    private Factory _Factory;

    [SetUp]
    public void SetUp()
    {
          _Factory = new Factory();
    }

    [Test]
    public void Create_ValidCreationData_CreatedProductHasName()
    {
           SomeProduct product = _Factory.Create(&quot;FooProduct&quot;);
           Assert.AreEqual(product.Name, &quot;FooProduct&quot;);
    }

    [Test]
    public void Create_ValidCreationData_CreatesProductHasNameOfVendor()
    {
           SomeProduct product = _Factory.Create(&quot;FooProduct&quot;);
           Assert.AreEqual(product.Vendor, &quot;Foo&quot;);
    }

    [Test]
    [ExpectedException(typeof(ArgumentNullException))]
    public void Create_NullForArgument_ThrowsArgumentNullException()
    {
           _Factory.Create(null);
    }
}
</pre>
<p>One downside of this approach is the sudden code duplication you now have in the code. It isn&#8217;t that big in the example but it can be in reality. You should treat test code as you&#8217;re treating production code. Don&#8217;t repeat yourself! I usually dealt with that situation by switching the test strategy.</p>
<p><strong>Switching to TEST-CLASS-PER-FIXTURE</strong></p>
<p>TEST-CLASS-PER-FIXTURE is again a test strategy described by Gerald Meszaros in this book &#8220;XUnit Test Patterns&#8221;. The basic idea is that you split your test classes into several test classes based on the common initialization / execution logic the methods share. Applied to the sample code this would result in this:</p>
<pre class="brush: csharp">
[TestFixture]
public class FactoryTest_ArgumentTests
{
    private Factory _Factory;

    [SetUp]
    public void SetUp()
    {
          _Factory = new Factory();
    }

    [Test]
    [ExpectedException(typeof(ArgumentNullException))]
    public void Create_NullForArgument_ThrowsArgumentNullException()
    {
           _Factory.Create(null);
    }
}

[TestFixture]
public class FactoryTest_CreatingAValidProduct
{
    private Factory _Factory;
    private SomeProduct _Product;

    [SetUp]
    public void SetUp()
    {
          _Factory = new Factory();
          _Product = _Factory.Create(&quot;FooProduct&quot;);
    }

    [Test]
    public void Create_ValidCreationData_CreatedProductHasName()
    {
           Assert.AreEqual(_Product.Name, &quot;FooProduct&quot;);
    }

    [Test]
    public void Create_ValidCreationData_CreatesProductHasNameOfVendor()
    {
           Assert.AreEqual(_Product.Vendor, &quot;Foo&quot;);
    }
}
</pre>
<p>I&#8217;ve worked with that approach for 2 years now. It suited my needs very well. However the tests are often not as expressive as I like them to be in terms of the naming. I&#8217;ll guess there&#8217;s a better naming scheme when using something like the TEST-CASE-CLASS-PER-FIXTURE testing strategy and that&#8217;s where the circle closes for me.</p>
<p><strong>Coming back to BDD</strong></p>
<p>While working through the preparation material for JP Boodhoos Nothing but .NET bootcamp I made first contact with his style of applying BDD. I must admit that I&#8217;m pretty amazed, because I&#8217;ve seen a lot of things of value for me. Sometimes sourcecode says more than a thousand words, so this is what the sample would look like if his BDD conventions have been applied to it:</p>
<pre class="brush: csharp">
[Concern(typeof (Factory))]
public class When_creating_a_valid_product : ContextSpecification
{
     private Factory _Factory;
     private Product _CreatedProduct;

     protected override void establish_context()
     {
            _Factory = new Factory();
     }

     protected override void because()
     {
           _CreatedProduct = _Factory.Create(&quot;Foo&quot;);
     }

     [Observation]
     public void the_product_should_contain_the_correct_product_name()
     {
          _CreatedProduct.Name.should_be_equal_to(&quot;FooProduct&quot;);
     }

     [Observation]
     public void the_product_should_contain_the_correct_vendor_name()
     {
          _CreatedProduct.Vendor.should_be_equal_to(&quot;Foo&quot;);
     }
}

[Concern(typeof (Factory))]
public class When_passing_null_for_product_name : ContextSpecification
{
     private Factory _Factory;
     private Action _Call;

     protected override void establish_context()
     {
            _Factory = new Factory();
     }

     protected override void because()
     {
           _Call = The.Action(() =&gt; _Factory.Create(null))
     }

     [Observation]
     public void should_throw_an_ArgumentNullException()
     {
           _Call.should_throw_an&lt;ArgumentNullException&gt;();
     }
}
</pre>
<p>Here is the base class that provides the hooks for the unit test framework (in this case MbUnit).</p>
<pre class="brush: csharp">
using MbUnit.Framework;
using Context = MbUnit.Framework.TestFixtureAttribute;

namespace NothinButDotNetPrep.SpecHelpers
{
    [Context]
    public abstract class ContextSpecification
    {
        [SetUp]
        public void setup()
        {
            establish_context();
            because();
        }

        [TearDown]
        public void teardown()
        {
            after_each_specification();
        }

        protected abstract void because();
        protected abstract void establish_context();
        protected virtual void after_each_specification()
        {
        }
    }
}
</pre>
<p>I like his way to implement the AAA (arrange, act and assert) pattern with the template method pattern and C# 3.0 extension method for the actual assertions very much. It feels like a natural progression to what I&#8217;ve been doing previously with a lot better readability. Another interesting thing is that he uses a tool called <em>bddunit </em> to generate a behavior documentation from the tests. A generated documentation would look like this:</p>
<ul>
<p>    Behavior of Factory</p>
<ul>
<li>
          When creating a valid product</p>
<ul>
<li>the product should contain the correct vendor name.</li>
<li>the product should contain the correct product name.</li>
</ul>
</li>
<li>
          When passing null for product name</p>
<ul>
<li>should throw an ArgumentNullException</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>I&#8217;ll definitely have to dig more into this. If you&#8217;re interested in learning more about BDD here are some links I&#8217;ve read this morning.</p>
<ul>
<li>Dan North: <a href="http://dannorth.net/introducing-bdd" target="_blank">Introducing BDD</a>.</li>
<li>AgileJoe: <a href="http://www.lostechies.com/blogs/joe_ocampo/archive/2007/08/07/attempting-to-demystify-behavior-driven-development.aspx" target="_blank">Attempting to demyistify BDD</a>.</li>
<li>JP: Bodhoo: <a href="http://codebetter.com/blogs/jean-paul_boodhoo/archive/2007/11/29/getting-started-with-bdd-style-context-specification-base-na.aspx" target="_blank">Getting started with BDD style Context / Specification base naming</a>.</li>
<li>Jimmy Bogard: <a href="http://grabbagoft.blogspot.com/2008/01/converting-tests-to-specs-is-bad-idea.html" target="_blank">Converting tests into specs is a bad idea</a>.</li>
<li>David Laribee: <a href="http://codebetter.com/blogs/david_laribee/archive/2007/12/17/approaching-bdd.aspx" target="_blank">Approaching BDD.</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bjoernrochel.de/2008/08/27/first-steps-with-bdd/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
