示例#1
0
        public void GetClientInstance_ShouldThrowIfHostIsInvalid()
        {
            // Given
            string host = "??????? Where Are My Invalid Values ???????";

            // When
            var exception = Record.Exception(() => RestUtilities.GetClientInstance(host));

            // Then
            exception.Should().BeOfType <ArgumentException>().Subject.ParamName.Should().Be("host");
        }
示例#2
0
        public void GetClientInstance_ShouldSucceed()
        {
            // Given
            // The valid host

            // When
            var exception = Record.Exception(() => RestUtilities.GetClientInstance(ValidHost));

            // Then
            exception.Should().Be(null);
        }
示例#3
0
        public void GetClientInstance_ShouldThrowIfHostIsNull()
        {
            // Given
            string host = null;

            // When
            var exception = Record.Exception(() => RestUtilities.GetClientInstance(host));

            // Then
            exception.Should().BeOfType <ArgumentNullException>().Subject.ParamName.Should().Be("host");
        }