public void Should_select_no_servers_when_none_exist()
        {
            var subject = new DelegateServerSelector((c, s) => s.Where(p => ((DnsEndPoint)p.EndPoint).Port == 0));

            var result = subject.SelectServers(_description, Enumerable.Empty<ServerDescription>()).ToList();

            result.Should().BeEmpty();
        }
        public void Should_select_no_servers_when_none_exist()
        {
            var subject = new DelegateServerSelector((c, s) => s.Where(p => ((DnsEndPoint)p.EndPoint).Port == 0));

            var result = subject.SelectServers(_description, Enumerable.Empty <ServerDescription>()).ToList();

            result.Should().BeEmpty();
        }
        public void Should_select_the_servers_matching_the_delegate()
        {
            var subject = new DelegateServerSelector((c, s) => s.Where(p => ((DnsEndPoint)p.EndPoint).Port >= 27018));

            var result = subject.SelectServers(_description, _description.Servers).ToList();

            result.Count.Should().Be(2);
            result.Should().BeEquivalentTo(new[] { _description.Servers[1], _description.Servers[2] });
        }
        public void Should_select_the_servers_matching_the_delegate()
        {
            var subject = new DelegateServerSelector((c, s) => s.Where(p => ((DnsEndPoint)p.EndPoint).Port >= 27018));

            var result = subject.SelectServers(_description, _description.Servers).ToList();

            result.Count.Should().Be(2);
            result.Should().BeEquivalentTo(new[] { _description.Servers[1], _description.Servers[2] });
        }