Esempio n. 1
0
        public void NameContainsInvalidChar_ReturnsFalse_WhenNameValid(string validName)
        {
            var result = HeadersValidation.NameContainsInvalidChar(validName, out (char Char, int Index)character);

            result.ShouldSatisfyAllConditions(
                () => result.ShouldBeFalse(),
                () => character.ShouldBe(default)
Esempio n. 2
0
 /// <summary>
 /// Set yes if you want validation when set _headers
 /// </summary>
 /// <param name="h"></param>
 public void SetValidation(HeadersValidation h)
 {
     this._doValidation = h;
 }
Esempio n. 3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="headerValidation"></param>
 /// <param name="handler"></param>
 /// <param name="cancellationToken"></param>
 public RESTClient(HeadersValidation headerValidation, HttpClientHandler handler, CancellationToken cancellationToken = default(CancellationToken))
 {
     _doValidation      = headerValidation;
     _httpClient        = new HttpClient(handler);
     _cancellationToken = cancellationToken;
 }