Skip to content
This repository was archived by the owner on Nov 22, 2018. It is now read-only.

Commit 544a044

Browse files
committed
Remove redundant test classes
1 parent 2d037e3 commit 544a044

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

test/Microsoft.AspNetCore.ResponseCaching.Tests/ResponseCachingContextTests.cs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,12 @@ public void RequestIsCacheableOverride_OverridesDefaultBehavior_ToNotAllowed()
125125
Assert.False(responseCachingContext.RequestIsCacheable());
126126
}
127127

128-
private class RequestCacheabilityIgnoreOverride : IResponseCachingRequestCacheabilityValidator
129-
{
130-
public OverrideResult RequestIsCacheableOverride(HttpContext httpContext) => OverrideResult.UseDefaultLogic;
131-
}
132-
133128
[Fact]
134129
public void RequestIsCacheableOverride_IgnoreFallsBackToDefaultBehavior()
135130
{
136131
var httpContext = new DefaultHttpContext();
137132
httpContext.Request.Method = "GET";
138-
var responseCachingContext = CreateTestContext(httpContext, new RequestCacheabilityIgnoreOverride());
133+
var responseCachingContext = CreateTestContext(httpContext, new NoopResponseCachingRequestCacheabilityValidator());
139134

140135
Assert.True(responseCachingContext.RequestIsCacheable());
141136

@@ -391,11 +386,6 @@ public void ResponseIsCacheableOverride_OverridesDefaultBehavior_ToNotAllowed()
391386
Assert.False(responseCachingContext.ResponseIsCacheable());
392387
}
393388

394-
private class ResponseCacheabilityIgnoreOverride : IResponseCachingResponseCacheabilityValidator
395-
{
396-
public OverrideResult ResponseIsCacheableOverride(HttpContext httpContext) => OverrideResult.UseDefaultLogic;
397-
}
398-
399389
[Fact]
400390
public void ResponseIsCacheableOverride_IgnoreFallsBackToDefaultBehavior()
401391
{
@@ -405,7 +395,7 @@ public void ResponseIsCacheableOverride_IgnoreFallsBackToDefaultBehavior()
405395
{
406396
Public = true
407397
};
408-
var responseCachingContext = CreateTestContext(httpContext, new ResponseCacheabilityIgnoreOverride());
398+
var responseCachingContext = CreateTestContext(httpContext, new NoopResponseCachingResponseCacheabilityValidator());
409399

410400
Assert.True(responseCachingContext.ResponseIsCacheable());
411401

0 commit comments

Comments
 (0)