Skip to content

Instantly share code, notes, and snippets.

@jmarnold
Created December 4, 2013 04:49
Show Gist options
  • Save jmarnold/7782521 to your computer and use it in GitHub Desktop.
Save jmarnold/7782521 to your computer and use it in GitHub Desktop.
Sample scenario configuration
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