public void Setup()
        {
            _repositoryMock = new Mock<IPeerRepository>();
            var configurationMock = new Mock<IDirectoryConfiguration>();
            configurationMock.SetupGet(conf => conf.DisableDynamicSubscriptionsForDirectoryOutgoingMessages).Returns(() => _disableDynamicSubscriptionsForDirectoryOutgoingMessages);
            _peerDirectory = new PeerDirectoryServer(configurationMock.Object, _repositoryMock.Object);

            _updatedPeer = null;
            _peerDirectory.PeerUpdated += (id, action) => _updatedPeer = new UpdatedPeer(id, action);

            _bus = new TestBus();

            _self = new Peer(new PeerId("Abc.DirectoryService.0"), "tcp://abc:42");
            _otherPeer = new Peer(new PeerId("Abc.Testing.0"), "tcp://abc:123");
        }
Пример #2
0
        public void Setup()
        {
            _repositoryMock = new Mock <IPeerRepository>();
            var configurationMock = new Mock <IDirectoryConfiguration>();

            configurationMock.SetupGet(conf => conf.DisableDynamicSubscriptionsForDirectoryOutgoingMessages).Returns(() => _disableDynamicSubscriptionsForDirectoryOutgoingMessages);
            _peerDirectory = new PeerDirectoryServer(configurationMock.Object, _repositoryMock.Object);

            _updatedPeer = null;
            _peerDirectory.PeerUpdated += (id, action) => _updatedPeer = new UpdatedPeer(id, action);

            _bus = new TestBus();

            _self      = new Peer(new PeerId("Abc.DirectoryService.0"), "tcp://abc:42");
            _otherPeer = new Peer(new PeerId("Abc.Testing.0"), "tcp://abc:123");
        }