Exemple #1
0
        /// <summary>
        /// Testuje, či správa o odozve HTTP obsahuje hlavičky obsahu poskytnuté v slovníku.
        /// </summary>
        /// <param name="headers">Dictionary containing content headers.</param>
        /// <returns>The same HTTP response message test builder.</returns>
        public IAndHttpHandlerResponseMessageTestBuilder ValidContainingContentHeaders(
            IDictionary <string, IEnumerable <string> > headers)
        {
            HttpResponseMessageValidator.ValidateContent(this.httpResponseMessage.Content, this.ThrowNewHttpResponseMessageAssertionException);
            HttpResponseMessageValidator.ValidateHeadersCount(
                headers,
                this.httpResponseMessage.Content.Headers,
                this.ThrowNewHttpResponseMessageAssertionException,
                isContentHeaders: true);

            headers.ForEach(h => this.ValidContainingContentHeader(h.Key, h.Value));
            return(this);
        }
 /// <summary>
 /// Testuje, či správa odozvy HTTP obsahuje hlavičky odpovedí poskytnuté v slovníku.
 /// </summary>
 /// <param name="headers">Dictionary containing response headers.</param>
 /// <returns>The same HTTP response message test builder.</returns>
 public IAndHttpResponseMessageTestBuilder ValidContainingHeaders(IDictionary <string, IEnumerable <string> > headers)
 {
     HttpResponseMessageValidator.ValidateHeadersCount(headers, this.ActionResult.Headers, this.ThrowNewHttpResponseMessageAssertionException);
     headers.ForEach(h => this.ValidContainingHeader(h.Key, h.Value));
     return(this);
 }