Right now we don't have any coupling between the mocking framework and the scenarios. It's definitely something we'll look at for the 0.5 release!
Hi guys, this is a great project, I would like to see it grow and contribute if I ever have some time to. I tried it in a small application and would like to know if there's any integration between the story framework and the SpecBase class, where the AutoMockingCOntainer
is used. In particular, I would like to create expectations while writing stories, and so far I have only been able to do it by "interrupting" the fluent interface to keep a reference to the story and the using explicitly RecordExpectedBehavior and
PlaybackBehavior, as in the snippet below:
var story = new Story("Download and compare two files");
IWant("to download the two files and compare them").
SoThat("I can resolve the conflict");
story2 = story.WithScenario("The files are identical")
.Given("that the content of the first file is", "a", input => Expect.Call(Get<IFileDownloader>().Download(null)).IgnoreArguments().Return(input))
.And("the the content of the second file is", "a", input => Expect.Call(Get<IFileDownloader>().Download(null)).IgnoreArguments().Return(input));
story2.When("the files are compared", () => result = helper.Process(new ccc))
.Then("the result should be", true, input => Assert.AreEqual(input, result0
Again, I your approach to BDD a lot, much more than emulating it with usual test fixtures, but I'm missing some documentation a lot.