Created
February 20, 2017 06:46
-
-
Save gasparnagy/95d4b644d1aced25bee797cd6fbffc20 to your computer and use it in GitHub Desktop.
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 static class TestDependencies | |
{ | |
[ScenarioDependencies] | |
public static ContainerBuilder CreateContainerBuilder() | |
{ | |
// create container with the runtime dependencies | |
var builder = Dependencies.CreateContainerBuilder(); | |
//TODO: add customizations, stubs required for testing | |
//auto-reg all types from our assembly | |
//builder.RegisterAssemblyTypes(typeof(TestDependencies).Assembly).SingleInstance(); | |
//auto-reg all [Binding] types from our assembly | |
builder.RegisterTypes(typeof(TestDependencies).Assembly.GetTypes().Where(t => Attribute.IsDefined(t, typeof(BindingAttribute))).ToArray()).SingleInstance(); | |
return builder; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment