Created
December 4, 2013 04:49
-
-
Save jmarnold/7782521 to your computer and use it in GitHub Desktop.
Sample scenario configuration
This file contains hidden or 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
public class MyScenarios : IFubuRegistryExtension | |
{ | |
public void Configure(FubuRegistry registry) | |
{ | |
registry.AlterSettings<ScenarioFilesSettings>(scenarios => scenarios.IncludeProvenance(typeof(OneExchangeSystem).Namespace)); | |
// Just an *optional* hook that gets invoked whenever a scenario is successfully run | |
// In our most recent usage, we forced a logout | |
registry.Services(x => x.ReplaceService<IStoryTellerHandler, OurStoryTellerHandler>()); | |
registry.Extensions().For<ScenariosList>(ScenarioDocument.Header, page => | |
{ | |
var block = new HtmlTag("blockquote") | |
.Style("padding", "10px") | |
.Style("border", "1px dashed #ccc") | |
.Style("width", "40%"); | |
block.AppendHtml("For testing we use the following standard authentication<br/>"); | |
block.Add("strong").AppendHtml("Username:"); | |
block.AppendHtml(" admin<br/>"); | |
block.Add("strong").AppendHtml("Password:"); | |
block.AppendHtml(" password<br/>"); | |
return block; | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment