Skip to content

Instantly share code, notes, and snippets.

@gasparnagy
Created February 20, 2017 06:45
Show Gist options
  • Save gasparnagy/55ec556004a41dbf221838bf43f56391 to your computer and use it in GitHub Desktop.
Save gasparnagy/55ec556004a41dbf221838bf43f56391 to your computer and use it in GitHub Desktop.
public class ControllerContext
{
public CalculatorController Controller { get; private set; }
public ControllerContext()
{
var containerBuilder = Dependencies.CreateContainerBuilder(); // invoke runtime dependency configuration
//TODO: apply test-specific customizations if needed
var container = containerBuilder.Build(); // create container
Controller = container.Resolve<CalculatorController>();
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment