[tinybdd] r55 committed - Added functionality in the ScenarioClass for reseting the semanticMode...

0 views
Skip to first unread message

codesite...@google.com

unread,
Sep 15, 2009, 3:05:35 AM9/15/09
to tin...@googlegroups.com
Revision: 55
Author: goeran.hansen
Date: Tue Sep 15 00:04:29 2009
Log: Added functionality in the ScenarioClass for reseting the
semanticModel.

http://code.google.com/p/tinybdd/source/detail?r=55

Modified:
/trunk/TinyBDD/Dsl/GivenWhenThen/ScenarioClass.cs
/trunk/TinyBDDTests/Dsl/GivenWhenThen/ScenarioClassSpecs.cs

=======================================
--- /trunk/TinyBDD/Dsl/GivenWhenThen/ScenarioClass.cs Tue Sep 8 01:30:22
2009
+++ /trunk/TinyBDD/Dsl/GivenWhenThen/ScenarioClass.cs Tue Sep 15 00:04:29
2009
@@ -33,6 +33,8 @@
public void Scenario(string text)
{
semanticModelState.Text = text;
+ semanticModelState.Arranges.Clear();
+ semanticModelState.Acts.Clear();
}

public GivenSemantics Given(string text)
=======================================
--- /trunk/TinyBDDTests/Dsl/GivenWhenThen/ScenarioClassSpecs.cs Tue Sep 8
01:30:22 2009
+++ /trunk/TinyBDDTests/Dsl/GivenWhenThen/ScenarioClassSpecs.cs Tue Sep 15
00:04:29 2009
@@ -62,6 +62,17 @@

semanticModelState.Text.ShouldBe("custom text");
}
+
+ [Test]
+ public void
Assure_describing_Scenario_with_custom_text_reset_the_SemanticModel()
+ {
+ scenario.Given("there are changesets in sourceControl");
+ semanticModelState.Arranges.Count.ShouldBe(1);
+
+ scenario.Scenario("a new scenario");
+ scenario.Given("there are changesets in sourceControl");
+ semanticModelState.Arranges.Count.ShouldBe(1);
+ }
}

[TestFixture]

Reply all
Reply to author
Forward
0 new messages