This project is read-only.

Fluent Story syntax

Jan 20, 2010 at 3:54 PM

I see in the latest release that the fluent syntax for expressing stories in C# has been deprecated.  Can I ask why this is?  I always thought that having a C# syntax *and* and a plaintext syntax (ala the text runner) was one of NBehave's strengths.


Jan 24, 2010 at 8:34 PM

One reaseon we deprecated the fluent interface because we felt/realized it wasnt such a good idea to mix text, fluent interfaces and lambda's. way to much noise imho. The seperation with plain text is much nicer.


Feb 24, 2010 at 11:45 PM
Edited Feb 24, 2010 at 11:47 PM


We felt the same way so much so that about a year ago we modified the release code to add some reflection to still allow us to use the fluent interface but with out the noise and the lambda, but to have seperate steps files and in fact to allow us to be driven by the senarios so in effect the story / scenario file would inherit from the steps file we would then use reflection we have implemented in the nbehave code base to seach for the step named the same as the scenario and execute it or show a missing step message. Where upon it could be implemented and then eventually everything would go green. We felt this was a bit a of cludge but it was the best answer we could come up with at the time a sort of half way house and of course it could be run from resharper i did send lazy dev a copy of the code but not as a patch i dont think it made it in but if you would likea copy for reference i have put a copy here, but it is built on a old version on nbehave:


Kind regards

Neil Martin

Mar 8, 2010 at 10:17 AM

Have now raised issue #56 on the Google Code site and have uploaded a patch that re-enables the fluent syntax.  The implementation now uses the NBehave.Narrator.Framework classes instead of the NBehave.NSpec.Framework classes, and the spec syntax is slightly different to how it used to be.  Please can one of the committers review the patch?


Mar 17, 2010 at 10:49 AM

I worked with John on this as a minor contributor based of some of my original code , i would ask the nbehave team to review and intergrate this patch as soon as possible as right now the nbehave framework is unusable in my teams with out this functionaility, and we are having to use old frameworks which i wrapped and extended over a year ago.



Mar 18, 2010 at 11:12 AM

I will look at it, have been very busy lately.

Mar 30, 2010 at 11:33 AM

I would also appreciate the fluent syntax making a return, if you don't have time perhaps you could give john commit rights and the ability to make a release?

Thanks for all your work :)

Mar 31, 2010 at 7:30 AM


Were all professional developers , so we understand work load and we really apreaciate all the effort you put in with this project , i know with developing blush how much effort it takes to develop in your own time. Would it be an idea to produce a contrib project or a branch which a diffrent team could contribute to and release along side the core perhaps as an idea?


Thanks agian for all your time and work on this.



Mar 31, 2010 at 12:07 PM


I dont want to switch frameworks but anyone who is looking for this functinaility in the mean time may i sugguest you take a look at storyQ

I personally may end up being pushed here because we need something qute rapidly.


Mar 31, 2010 at 1:00 PM

I have taken a first look at the patch supplied but at least two files where missing so it doesnt compile.

Apr 4, 2010 at 9:12 AM

Path is now applied, you can grab the build from the buildserver here.