Last active
December 24, 2015 12:58
-
-
Save bartelink/6800893 to your computer and use it in GitHub Desktop.
My TickSpec.xunit boilerplate (just add .feature files as EmbeddedResources and group them into XXXFeatures.fs as in the example DiagnosticFeatures.fs file)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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