/// <summary>
        /// Tests whether the <see cref="ActionResult"/>
        /// contains the same content types provided as collection of <see cref="MediaTypeHeaderValue"/>.
        /// </summary>
        /// <param name="baseTestBuilderWithOutputResult">
        /// Instance of <see cref="IBaseTestBuilderWithOutputResult{TOutputResultTestBuilder}"/> type.
        /// </param>
        /// <param name="contentTypes">Content types as collection of <see cref="MediaTypeHeaderValue"/>.</param>
        /// <returns>The same output <see cref="ActionResult"/> test builder.</returns>
        public static TOutputResultTestBuilder ContainingContentTypes <TOutputResultTestBuilder>(
            this IBaseTestBuilderWithOutputResult <TOutputResultTestBuilder> baseTestBuilderWithOutputResult,
            IEnumerable <MediaTypeHeaderValue> contentTypes)
            where TOutputResultTestBuilder : IBaseTestBuilderWithActionResult
        {
            var actualBuilder = GetActualBuilder(baseTestBuilderWithOutputResult);

            ValidateObjectResult(actualBuilder);

            ContentTypeValidator.ValidateContentTypes(
                actualBuilder.TestContext.MethodResult,
                contentTypes,
                actualBuilder.ThrowNewFailedValidationException);

            return(actualBuilder.ResultTestBuilder);
        }
        /// <summary>
        /// Tests whether the <see cref="ActionResult"/>
        /// contains the provided output formatters.
        /// </summary>
        /// <param name="baseTestBuilderWithOutputResult">
        /// Instance of <see cref="IBaseTestBuilderWithOutputResult{TOutputResultTestBuilder}"/> type.
        /// </param>
        /// <param name="outputFormatters">Collection of <see cref="IOutputFormatter"/>.</param>
        /// <returns>The same output <see cref="ActionResult"/> test builder.</returns>
        public static TOutputResultTestBuilder ContainingOutputFormatters <TOutputResultTestBuilder>(
            this IBaseTestBuilderWithOutputResult <TOutputResultTestBuilder> baseTestBuilderWithOutputResult,
            IEnumerable <IOutputFormatter> outputFormatters)
            where TOutputResultTestBuilder : IBaseTestBuilderWithActionResult
        {
            var actualBuilder = GetActualBuilder(baseTestBuilderWithOutputResult);

            ValidateObjectResult(actualBuilder);

            OutputFormatterValidator.ValidateOutputFormatters(
                actualBuilder.GetObjectResult(),
                outputFormatters,
                actualBuilder.ThrowNewFailedValidationException);

            return(actualBuilder.ResultTestBuilder);
        }
        /// <summary>
        /// Tests whether the <see cref="ActionResult"/>
        /// contains <see cref="IOutputFormatter"/> of the provided type.
        /// </summary>
        /// <param name="baseTestBuilderWithOutputResult">
        /// Instance of <see cref="IBaseTestBuilderWithOutputResult{TOutputResultTestBuilder}"/> type.
        /// </param>
        /// <returns>The same output <see cref="ActionResult"/> test builder.</returns>
        public static TOutputResultTestBuilder ContainingOutputFormatterOfType <
            TOutputResultTestBuilder, TOutputFormatter>(
            this IBaseTestBuilderWithOutputResult <TOutputResultTestBuilder> baseTestBuilderWithOutputResult)
            where TOutputResultTestBuilder : IBaseTestBuilderWithActionResult
            where TOutputFormatter : IOutputFormatter
        {
            var actualBuilder = GetActualBuilder(baseTestBuilderWithOutputResult);

            ValidateObjectResult(actualBuilder);

            OutputFormatterValidator.ValidateContainingOutputFormatterOfType <TOutputFormatter>(
                actualBuilder.GetObjectResult(),
                actualBuilder.ThrowNewFailedValidationException);

            return(actualBuilder.ResultTestBuilder);
        }
 /// <summary>
 /// Tests whether the <see cref="ActionResult"/>
 /// contains the same content types provided as string parameters.
 /// </summary>
 /// <param name="baseTestBuilderWithOutputResult">
 /// Instance of <see cref="IBaseTestBuilderWithOutputResult{TOutputResultTestBuilder}"/> type.
 /// </param>
 /// <param name="contentTypes">Content types as string parameters.</param>
 /// <returns>The same output <see cref="ActionResult"/> test builder.</returns>
 public static TOutputResultTestBuilder ContainingContentTypes <TOutputResultTestBuilder>(
     this IBaseTestBuilderWithOutputResult <TOutputResultTestBuilder> baseTestBuilderWithOutputResult,
     params string[] contentTypes)
     where TOutputResultTestBuilder : IBaseTestBuilderWithActionResult
 => baseTestBuilderWithOutputResult
 .ContainingContentTypes(contentTypes.AsEnumerable());
 /// <summary>
 /// Tests whether the <see cref="ActionResult"/>
 /// contains the same content types provided as collection of strings.
 /// </summary>
 /// <param name="baseTestBuilderWithOutputResult">
 /// Instance of <see cref="IBaseTestBuilderWithOutputResult{TOutputResultTestBuilder}"/> type.
 /// </param>
 /// <param name="contentTypes">Content types as collection of strings.</param>
 /// <returns>The same output <see cref="ActionResult"/> test builder.</returns>
 public static TOutputResultTestBuilder ContainingContentTypes <TOutputResultTestBuilder>(
     this IBaseTestBuilderWithOutputResult <TOutputResultTestBuilder> baseTestBuilderWithOutputResult,
     IEnumerable <string> contentTypes)
     where TOutputResultTestBuilder : IBaseTestBuilderWithActionResult
 => baseTestBuilderWithOutputResult
 .ContainingContentTypes(contentTypes.Select(ct => new MediaTypeHeaderValue(ct)));
 /// <summary>
 /// Tests whether the <see cref="ActionResult"/>
 /// contains the content type provided as string.
 /// </summary>
 /// <param name="baseTestBuilderWithOutputResult">
 /// Instance of <see cref="IBaseTestBuilderWithOutputResult{TOutputResultTestBuilder}"/> type.
 /// </param>
 /// <param name="contentType">Content type as string.</param>
 /// <returns>The same output <see cref="ActionResult"/> test builder.</returns>
 public static TOutputResultTestBuilder ContainingContentType <TOutputResultTestBuilder>(
     this IBaseTestBuilderWithOutputResult <TOutputResultTestBuilder> baseTestBuilderWithOutputResult,
     string contentType)
     where TOutputResultTestBuilder : IBaseTestBuilderWithActionResult
 => baseTestBuilderWithOutputResult.ContainingContentType(new MediaTypeHeaderValue(contentType));
 GetActualBuilder <TOutputResultTestBuilder>(
     IBaseTestBuilderWithOutputResult <TOutputResultTestBuilder> baseTestBuilderWithOutputResult)
     where TOutputResultTestBuilder : IBaseTestBuilderWithActionResult
 => (IBaseTestBuilderWithOutputResultInternal <TOutputResultTestBuilder>)baseTestBuilderWithOutputResult;
 /// <summary>
 /// Tests whether the <see cref="ActionResult"/>
 /// contains the provided output formatters.
 /// </summary>
 /// <param name="baseTestBuilderWithOutputResult">
 /// Instance of <see cref="IBaseTestBuilderWithOutputResult{TOutputResultTestBuilder}"/> type.
 /// </param>
 /// <param name="outputFormatters"><see cref="IOutputFormatter"/> parameters.</param>
 /// <returns>The same output <see cref="ActionResult"/> test builder.</returns>
 public static TOutputResultTestBuilder ContainingOutputFormatters <TOutputResultTestBuilder>(
     this IBaseTestBuilderWithOutputResult <TOutputResultTestBuilder> baseTestBuilderWithOutputResult,
     params IOutputFormatter[] outputFormatters)
     where TOutputResultTestBuilder : IBaseTestBuilderWithActionResult
 => baseTestBuilderWithOutputResult
 .ContainingOutputFormatters(outputFormatters.AsEnumerable());