public void should_resolve_peer_using_basic_round_robin_for_different_commands()
        {
            // Arrange
            var resolver = new RoundRobinPeerSelector();

            var command1             = new FakeCommand(42);
            var command1Peer1        = new Peer(new PeerId("command1peer1"), "endpoint1");
            var command1Peer2        = new Peer(new PeerId("command1peer2"), "endpoint2");
            var command1HandlingPeer = new[] { command1Peer1, command1Peer2 };

            var command2             = new FakeInfrastructureCommand();
            var command2Peer1        = new Peer(new PeerId("command2peer1"), "endpoint1");
            var command2Peer2        = new Peer(new PeerId("command2peer2"), "endpoint2");
            var command2HandlingPeer = new[] { command2Peer1, command2Peer2 };

            // Act - Assert
            var resolvedPeer = resolver.GetTargetPeer(command1, command1HandlingPeer);

            resolvedPeer.ShouldEqual(command1Peer1);

            resolvedPeer = resolver.GetTargetPeer(command1, command1HandlingPeer);
            resolvedPeer.ShouldEqual(command1Peer2);

            resolvedPeer = resolver.GetTargetPeer(command2, command2HandlingPeer);
            resolvedPeer.ShouldEqual(command2Peer1);

            resolvedPeer = resolver.GetTargetPeer(command1, command1HandlingPeer);
            resolvedPeer.ShouldEqual(command1Peer1);

            resolvedPeer = resolver.GetTargetPeer(command2, command2HandlingPeer);
            resolvedPeer.ShouldEqual(command2Peer2);

            resolvedPeer = resolver.GetTargetPeer(command2, command2HandlingPeer);
            resolvedPeer.ShouldEqual(command2Peer1);
        }
        public void should_resolve_peer_using_basic_round_robin_for_different_commands()
        {
            // Arrange
            var resolver = new RoundRobinPeerSelector();
            
            var command1 = new FakeCommand(42);
            var command1Peer1 = new Peer(new PeerId("command1peer1"), "endpoint1");
            var command1Peer2 = new Peer(new PeerId("command1peer2"), "endpoint2");
            var command1HandlingPeer = new[] { command1Peer1, command1Peer2 };

            var command2 = new FakeInfrastructureCommand();
            var command2Peer1 = new Peer(new PeerId("command2peer1"), "endpoint1");
            var command2Peer2 = new Peer(new PeerId("command2peer2"), "endpoint2");
            var command2HandlingPeer = new[] { command2Peer1, command2Peer2 };

            // Act - Assert
            var resolvedPeer = resolver.GetTargetPeer(command1, command1HandlingPeer);
            resolvedPeer.ShouldEqual(command1Peer1);

            resolvedPeer = resolver.GetTargetPeer(command1, command1HandlingPeer);
            resolvedPeer.ShouldEqual(command1Peer2);

            resolvedPeer = resolver.GetTargetPeer(command2, command2HandlingPeer);
            resolvedPeer.ShouldEqual(command2Peer1);

            resolvedPeer = resolver.GetTargetPeer(command1, command1HandlingPeer);
            resolvedPeer.ShouldEqual(command1Peer1);

            resolvedPeer = resolver.GetTargetPeer(command2, command2HandlingPeer);
            resolvedPeer.ShouldEqual(command2Peer2);

            resolvedPeer = resolver.GetTargetPeer(command2, command2HandlingPeer);
            resolvedPeer.ShouldEqual(command2Peer1);
        }