Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
My TickSpec.xunit boilerplate (just add .feature files as EmbeddedResources and group them into XXXFeatures.fs as in the example DiagnosticFeatures.fs file)
open TickSpec
open Features
module DiagnosticFeatures =
[<TickFact>]
let ConnectivityFeature () =
generateScenariosFromEmbeddedFeatureFile "Connectivity"
[<TickFact>]
let VersionFeature () =
generateScenariosFromEmbeddedFeatureFile "Version"
#if INCLUDE_INTERNAL
[<TickFact>]
let IntegrityFeature () =
generateScenariosFromEmbeddedFeatureFile "Integrity"
#endif
open TickSpec
module Features =
let assembly = System.Reflection.Assembly.GetExecutingAssembly()
let stepDefinitions = new StepDefinitions(assembly.GetExportedTypes())
let generateScenariosFromEmbeddedFeatureFile embeddedDotFeatureFilename =
let source = embeddedDotFeatureFilename + ".feature"
stepDefinitions.GenerateScenarios(source,assembly.GetManifestResourceStream(source))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.