Ejemplo n.º 1
0
        public void should_not_get_peer_with_non_matching_subscrition_binding_key()
        {
            var command = new FakeRoutableCommand(10, "u.name");

            var peerDescriptor = TestDataBuilder.CreatePersistentPeerDescriptor("tcp://goodapple:123", new Subscription(command.TypeId(), new BindingKey("12", "#")));

            _repositoryMock.Setup(x => x.GetPeers(It.IsAny <bool>())).Returns(new[] { peerDescriptor });

            _peerDirectory.GetPeersHandlingMessage(command).ShouldBeEmpty();
        }
        public void should_not_get_peer_with_non_matching_subscrition_binding_key()
        {
            var command = new FakeRoutableCommand(10, "u.name");

            var peerDescriptor = TestDataBuilder.CreatePersistentPeerDescriptor("tcp://goodapple:123", new Subscription(command.TypeId(), new BindingKey("12", "#")));
            _repositoryMock.Setup(x => x.GetPeers(It.IsAny<bool>())).Returns(new[] { peerDescriptor });

            _peerDirectory.GetPeersHandlingMessage(command).ShouldBeEmpty();
        }