public void TryParse_should_return_false_when_the_end_point_is_invalid(string value)
        {
            EndPoint result;
            var      success = EndPointParser.TryParse(value, out result);

            success.Should().BeFalse();
        }
        public void TryParse_should_parse_an_ipv6_address(string value, string expectedAddress, int expectedPort)
        {
            EndPoint result;
            var      success = EndPointParser.TryParse(value, out result);

            success.Should().BeTrue();
            result.Should().Be(new IPEndPoint(IPAddress.Parse(expectedAddress), expectedPort));
            result.AddressFamily.Should().Be(AddressFamily.InterNetworkV6);
        }
        public void TryParse_should_parse_a_hostname(string value, string expectedHost, int expectedPort)
        {
            EndPoint result;
            var      success = EndPointParser.TryParse(value, out result);

            success.Should().BeTrue();
            result.Should().Be(new DnsEndPoint(expectedHost, expectedPort));
            result.AddressFamily.Should().Be(AddressFamily.Unspecified);
        }