public void Contains() { var commands = new Mock <ICommandContainer>(); { commands.Setup(c => c.Contains(It.IsAny <CommandId>())) .Returns(false); } var notificationNames = new MockNotificationNameConstants(); var systemDiagnostics = new SystemDiagnostics((p, s) => { }, null); var builder = new ContainerBuilder(); { builder.Register(c => commands.Object).As <ICommandContainer>(); builder.Register(c => notificationNames).As <INotificationNameConstants>(); builder.Register(c => systemDiagnostics).As <SystemDiagnostics>(); } Action <IContainer> onStartService = c => { }; var service = new UserInterfaceService( builder.Build(), onStartService, systemDiagnostics); Assert.IsFalse(service.Contains(new CommandId("bla"))); }
public void Contains() { var commands = new Mock<ICommandContainer>(); { commands.Setup(c => c.Contains(It.IsAny<CommandId>())) .Returns(false); } var notificationNames = new MockNotificationNameConstants(); var systemDiagnostics = new SystemDiagnostics((p, s) => { }, null); var builder = new ContainerBuilder(); { builder.Register(c => commands.Object).As<ICommandContainer>(); builder.Register(c => notificationNames).As<INotificationNameConstants>(); builder.Register(c => systemDiagnostics).As<SystemDiagnostics>(); } Action<IContainer> onStartService = c => { }; var service = new UserInterfaceService( builder.Build(), onStartService, systemDiagnostics); Assert.IsFalse(service.Contains(new CommandId("bla"))); }