public void Setup() { _contextScope = MessageContext.SetCurrent(MessageContext.CreateTest()); _configurationMock = new Mock<IDirectoryConfiguration>(); _configurationMock.SetupGet(conf => conf.BlacklistedMachines).Returns(new[] { "ANOTHER_BLACKLISTEDMACHINE", "BLACKlistedMACHINE" }); _repositoryMock = new Mock<IPeerRepository>(); _bus = new TestBus(); _handler = new DirectoryCommandsHandler(_bus, _repositoryMock.Object, _configurationMock.Object) { Context = MessageContext.CreateOverride(_sender.Id, _sender.EndPoint) }; }
public void Setup() { _contextScope = MessageContext.SetCurrent(MessageContext.CreateTest()); _configurationMock = new Mock <IDirectoryConfiguration>(); _configurationMock.SetupGet(conf => conf.BlacklistedMachines).Returns(new[] { "ANOTHER_BLACKLISTEDMACHINE", "BLACKlistedMACHINE" }); _repositoryMock = new Mock <IPeerRepository>(); _bus = new TestBus(); _speedReporter = new Mock <IDirectorySpeedReporter>(); _handler = new DirectoryCommandsHandler(_bus, _repositoryMock.Object, _configurationMock.Object, _speedReporter.Object) { Context = MessageContext.CreateOverride(_sender.Id, _sender.EndPoint) }; }