Copy from
For more info, see the
+ ///
+ /// [TestClass]
+ /// public class When_adding_a_single_item_to_an_empty_cart : ContextSpecification
+ /// {
+ /// ICart _cart;
+ ///
+ /// protected void override Given()
+ /// {
+ /// _cart = CartFactory.Create("TEST");
+ /// _cart.AddItem(ProductFactory.Create("SKU"));
+ /// }
+ ///
+ /// protected void override When()
+ /// {
+ /// _cart.RemoveItem("SKU");
+ /// }
+ ///
+ /// [TestMethod]
+ /// public void then_the_cart_is_empty()
+ /// {
+ /// Assert.AreEqual(1, _cart.TotalItems);
+ /// }
+ ///
+ /// [TestMethod]
+ /// public void then_the_cart_subtotal_is_zero()
+ /// {
+ /// Assert.AreEqual(0d, _cart.Subtotal);
+ /// }
+ /// }
+ ///
+ /// In the generated TRX file from MSTest, the test class and name are specified with the pass result:
+ ///
+ /// ------------------------------------------------------------------------------------------------------
+ /// Result | Class name | Test Name
+ /// ------------------------------------------------------------------------------------------------------
+ /// Passed When_adding_a_single_item_to_an_empty_cart then_the_cart_is_empty
+ /// Passed When_adding_a_single_item_to_an_empty_cart then_the_cart_subtotal_is_zero
+ ///
+ /// The TRX file is XML, and can be transformed to HTML to generate a report of capabilities of the system
+ /// automatically
+ /// during a build activity, yielding a "living spec".
+ /// More info on BDD:
+ /// http://en.wikipedia.org/wiki/Behavior-driven_development
+ /// http://channel9.msdn.com/Events/TechEd/NorthAmerica/2010/DPR302
+ ///