public void TestRegister() { var instance = new SimpleInjectorServiceContainer(new Container(), this.LogManager); instance.Register <IServiceContainer>(() => instance, ScopeServiceEnum.SINGLETON); instance.Register <ILogManager, Log4NetLogManager>(); instance.RegisterSingleton <IEnumerable>(new List <string>()); }
public void TestResolveType() { var instance = new SimpleInjectorServiceContainer(new Container(), this.LogManager); instance.Register <IServiceContainer>(() => instance, ScopeServiceEnum.Singleton); instance.Register <ILogManager, Log4NetLogManager>(); instance.RegisterSingleton <IEnumerable>(new List <string>()); Assert.IsNotNull(instance.ResolveType <IServiceContainer>()); Assert.IsNotNull(instance.ResolveType <ILogManager>()); Assert.IsNotNull(instance.ResolveType <IEnumerable>()); }