Skip to content

Instantly share code, notes, and snippets.

@Pondidum
Created October 18, 2015 21:11
Show Gist options
  • Select an option

  • Save Pondidum/9e693d3ec1eb2a4f84ee to your computer and use it in GitHub Desktop.

Select an option

Save Pondidum/9e693d3ec1eb2a4f84ee to your computer and use it in GitHub Desktop.
Structuremap response
[Fact]
public void Can_resolve_action()
{
Action<TokenizerConfigurator> action = config =>
{
/* whatever */
};
var container = new Container(c =>
{
c.Scan(a =>
{
a.TheCallingAssembly();
a.WithDefaultConventions();
});
c.For<Action<TokenizerConfigurator>>().Use(action);
});
container.GetInstance<Test>().ShouldNotBe(null);
}
public class Test
{
public Test(Action<TokenizerConfigurator> config)
{
}
}
public class TokenizerConfigurator
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment