Ejemplo n.º 1
0
        public void Equals_should_return_true_when_endpoints_are_equal(string a, string b, bool expectedResult)
        {
            var endPoint1 = a == null ? null : EndPointHelper.Parse(a);
            var endPoint2 = b == null ? null : EndPointHelper.Parse(b);

            var result = EndPointHelper.Equals(endPoint1, endPoint2);

            result.Should().Be(expectedResult);
        }
        public void Parse_should_throw_an_ArgumentException_when_value_is_not_a_valid_end_point(string value)
        {
            Action act = () => EndPointHelper.Parse(value);

            act.ShouldThrow <ArgumentException>();
        }
        public void Parse_should_throw_an_ArgumentNullException_when_value_is_null()
        {
            Action act = () => EndPointHelper.Parse(null);

            act.ShouldThrow <ArgumentNullException>();
        }