Esempio n. 1
0
 private void RegisterType(Mock<IUnityContainer> mockContainer, UnityContainer unityContainer, Type interfaceType)
 {
     var mock = unityContainer.RegisterMoqInstance(interfaceType);
     mockContainer.Setup(x => x.Resolve(interfaceType, null)).Returns(mock);
 }
Esempio n. 2
0
 private void ConfigureContainer(UnityContainer container)
 {
     _writer = new Mock<IWriter>();
     container.RegisterMoqInstance<IWriterFactory>();
     container.RegisterMoqInstance<IVersion>();
     _environment = container.RegisterMoqInstance<IEnvironment>();
     container.RegisterMoqInstance<IDebugger>();
     _console = container.RegisterMoqInstance<IConsole>();
     _fileSystem = container.RegisterMoqInstance<IFileSystem>();
 }