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)
/// <summary> /// Set yes if you want validation when set _headers /// </summary> /// <param name="h"></param> public void SetValidation(HeadersValidation h) { this._doValidation = h; }
/// <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; }