Beispiel #1
0
 /// <summary>
 /// Tests whether the collected attributes contain <see cref="ResponseCacheAttribute"/>.
 /// </summary>
 /// <param name="controllerActionAttributesTestBuilder">
 /// Instance of <see cref="IControllerActionAttributesTestBuilder{TAttributesTestBuilder}"/> type.
 /// </param>
 /// <param name="withCacheProfileName">Expected cache profile name.</param>
 /// <returns>The same attributes test builder.</returns>
 public static TAttributesTestBuilder CachingResponse <TAttributesTestBuilder>(
     this IControllerActionAttributesTestBuilder <TAttributesTestBuilder> controllerActionAttributesTestBuilder,
     string withCacheProfileName)
     where TAttributesTestBuilder : IControllerActionAttributesTestBuilder <TAttributesTestBuilder>
 => controllerActionAttributesTestBuilder
 .CachingResponse(responseCache => responseCache
                  .WithCacheProfileName(withCacheProfileName));
Beispiel #2
0
 /// <summary>
 /// Tests whether the collected attributes contain <see cref="ResponseCacheAttribute"/>.
 /// </summary>
 /// <param name="controllerActionAttributesTestBuilder">
 /// Instance of <see cref="IControllerActionAttributesTestBuilder{TAttributesTestBuilder}"/> type.
 /// </param>
 /// <param name="withDuration">Expected duration.</param>
 /// <returns></returns>
 public static TAttributesTestBuilder CachingResponse <TAttributesTestBuilder>(
     this IControllerActionAttributesTestBuilder <TAttributesTestBuilder> controllerActionAttributesTestBuilder,
     int withDuration)
     where TAttributesTestBuilder : IControllerActionAttributesTestBuilder <TAttributesTestBuilder>
 => controllerActionAttributesTestBuilder
 .CachingResponse(responseCache => responseCache
                  .WithDuration(withDuration));