public void RegisterDependencies_RegistersTypes() { var container = new ConfigDependencyContainer(); var unityContainer = new UnityContainer(); container.RegisterDependencies(unityContainer); Assert.AreNotEqual(0, unityContainer.Registrations.Count()); }
public void InitializeDependencies_LoadsConfigFile() { var container = new ConfigDependencyContainer(); var unityContainer = new UnityContainer(); unityContainer.RegisterType <IConfigFileLoadActions>( new ContainerControlledLifetimeManager(), new InjectionFactory(CreateConfigLoadActions)); container.InitializeDependencies(unityContainer); Mock.Get(unityContainer.Resolve <IConfigFileLoadActions>()) .Verify(x => x.LoadConfigFile(), Times.Once); }