FsStory

A library for writing executable user stories in F#
Download

FsStory Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Ms-PL
  • Publisher Name:
  • Gustaf_NK
  • Operating Systems:
  • Windows All
  • File Size:
  • 16 KB

FsStory Tags


FsStory Description

FsStory was developed to be a library for writing executable user stories in F#. FsStory will enable developers to write user story scenarios (in Given/When/Then form) in F# code. Did you notice [] attribute just before the function definition? It is a xUnit.net specific attribute, telling xUnit.net that the function is a runnable test. So, why xUnit.net? Answer: xUnit.net is the currently the only test framework that runs static test methods (that is, in IL), which is what F# functions compiles to. Note: Some people may think that the story above is too low level to be a "good" user story. We think they're right, but it's just an example. Please contribute to the project with more examples. The "ATurtle", "IsRotated90DegreesToTheRight", "TurtleWalksSteps", etc, are functions that you have to implement yourself. What these functions do is not FsStory's business, except that they have the same type. It's a good thing to think about this in advance. If you're testing something object oriented, i.e. a C# project, then you're probably have to let the functions have the type () -> ()*. That is, they take no argument and return void, in C# lingo. You'd also need a mutable variable to accomplish this.


FsStory Related Software