291 references to TestUtils
Microsoft.AspNetCore.OutputCaching.Tests (291)
OutputCacheAttributeTests.cs (9)
14var context = TestUtils.CreateUninitializedContext(); 25var context = TestUtils.CreateUninitializedContext(); 37var context = TestUtils.CreateUninitializedContext(); 51var context = TestUtils.CreateUninitializedContext(options: options); 66var context = TestUtils.CreateUninitializedContext(options: options); 77var context = TestUtils.CreateUninitializedContext(); 93var context = TestUtils.CreateUninitializedContext(); 108var context = TestUtils.CreateUninitializedContext(); 127var context = TestUtils.CreateUninitializedContext();
OutputCacheKeyProviderTests.cs (59)
18var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 19var context = TestUtils.CreateTestContext(); 33var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 34var context = TestUtils.CreateTestContext(); 50var cacheKeyProvider = TestUtils.CreateTestKeyProvider(new OutputCacheOptions() 54var context = TestUtils.CreateTestContext(); 65var cacheKeyProvider = TestUtils.CreateTestKeyProvider(new OutputCacheOptions() 69var context = TestUtils.CreateTestContext(); 79var context = TestUtils.CreateTestContext(); 87var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 88var context = TestUtils.CreateTestContext(); 97var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 98var context = TestUtils.CreateTestContext(); 110var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 111var context = TestUtils.CreateTestContext(); 131var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 132var context = TestUtils.CreateTestContext(); 143var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 144var context = TestUtils.CreateTestContext(); 156var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 157var context = TestUtils.CreateTestContext(); 168var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 169var context = TestUtils.CreateTestContext(); 181var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 182var context = TestUtils.CreateTestContext(); 194var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 195var context = TestUtils.CreateTestContext(); 207var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 208var context = TestUtils.CreateTestContext(); 220var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 221var context = TestUtils.CreateTestContext(); 235var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 236var context = TestUtils.CreateTestContext(); 250var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 251var context = TestUtils.CreateTestContext(); 265var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 266var context = TestUtils.CreateTestContext(); 284var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 285var context = TestUtils.CreateTestContext(); 296var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 297var context = TestUtils.CreateTestContext(); 309var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 310var context = TestUtils.CreateTestContext(); 321var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 322var context = TestUtils.CreateTestContext(); 335var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 336var context = TestUtils.CreateTestContext(); 349var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 350var context = TestUtils.CreateTestContext(); 362var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 363var context = TestUtils.CreateTestContext(); 375var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 376var context = TestUtils.CreateTestContext(); 388var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 389var context = TestUtils.CreateTestContext(); 402var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 403var context = TestUtils.CreateTestContext(); 417var cacheKeyProvider = TestUtils.CreateTestKeyProvider(); 418var context = TestUtils.CreateTestContext();
OutputCacheMiddlewareTests.cs (96)
37var middleware = TestUtils.CreateTestMiddleware(testSink: sink, cache: cache, keyProvider: new TestResponseCachingKeyProvider("BaseKey")); 38var context = TestUtils.CreateTestContext(cache: cache); 47TestUtils.AssertLoggedMessages( 57var middleware = TestUtils.CreateTestMiddleware(testSink: sink, cache: cache, keyProvider: new TestResponseCachingKeyProvider("BaseKey")); 58var context = TestUtils.CreateTestContext(cache: cache); 63TestUtils.AssertLoggedMessages( 73var middleware = TestUtils.CreateTestMiddleware(testSink: sink, cache: cache, keyProvider: new TestResponseCachingKeyProvider("BaseKey")); 74var context = TestUtils.CreateTestContext(cache: cache); 91TestUtils.AssertLoggedMessages( 101var middleware = TestUtils.CreateTestMiddleware(testSink: sink, cache: cache, keyProvider: new TestResponseCachingKeyProvider("BaseKey")); 102var context = TestUtils.CreateTestContext(cache: cache); 121TestUtils.AssertLoggedMessages( 131var middleware = TestUtils.CreateTestMiddleware(testSink: sink, cache: cache, keyProvider: new TestResponseCachingKeyProvider("BaseKey")); 132var context = TestUtils.CreateTestContext(cache: cache); 149TestUtils.AssertLoggedMessages( 160var middleware = TestUtils.CreateTestMiddleware(testSink: sink, cache: cache); 161var context = TestUtils.CreateTestContext(testSink: sink); 174var context = TestUtils.CreateTestContext(testSink: sink); 175var middleware = TestUtils.CreateTestMiddleware(testSink: sink); 201TestUtils.AssertLoggedMessages( 212var middleware = TestUtils.CreateTestMiddleware(testSink: sink); 213var context = TestUtils.CreateTestContext(testSink: sink); 243TestUtils.AssertLoggedMessages( 254var middleware = TestUtils.CreateTestMiddleware(testSink: sink); 255var context = TestUtils.CreateTestContext(testSink: sink); 265TestUtils.AssertLoggedMessages( 275var middleware = TestUtils.CreateTestMiddleware(testSink: sink); 276var context = TestUtils.CreateTestContext(testSink: sink); 293var middleware = TestUtils.CreateTestMiddleware(testSink: sink); 294var context = TestUtils.CreateTestContext(testSink: sink); 322var middleware = TestUtils.CreateTestMiddleware(testSink: sink); 323var context = TestUtils.CreateTestContext(testSink: sink); 330TestUtils.AssertLoggedMessages( 339var middleware = TestUtils.CreateTestMiddleware(testSink: sink); 340var context = TestUtils.CreateTestContext(testSink: sink); 354var middleware = TestUtils.CreateTestMiddleware(testSink: sink); 355var context = TestUtils.CreateTestContext(testSink: sink); 362TestUtils.AssertLoggedMessages( 371var middleware = TestUtils.CreateTestMiddleware(options: new OutputCacheOptions 375var context = TestUtils.CreateTestContext(); 387var middleware = TestUtils.CreateTestMiddleware(options: new OutputCacheOptions 391var context = TestUtils.CreateTestContext(); 409var middleware = TestUtils.CreateTestMiddleware(testSink: sink); 410var context = TestUtils.CreateTestContext(); 429var middleware = TestUtils.CreateTestMiddleware(testSink: sink, options: options); 430var context = TestUtils.CreateTestContext(); 452var middleware = TestUtils.CreateTestMiddleware(testSink: sink, options: options); 453var context = TestUtils.CreateTestContext(); 478var middleware = TestUtils.CreateTestMiddleware(testSink: sink, options: options); 479var context = TestUtils.CreateTestContext(); 519var middleware = TestUtils.CreateTestMiddleware(testSink: sink, cache: cache); 520var context = TestUtils.CreateTestContext(cache: cache); 538var middleware = TestUtils.CreateTestMiddleware(testSink: sink); 539var context = TestUtils.CreateTestContext(); 559var middleware = TestUtils.CreateTestMiddleware(testSink: sink); 560var context = TestUtils.CreateTestContext(); 577var middleware = TestUtils.CreateTestMiddleware(testSink: sink); 578var context = TestUtils.CreateTestContext(); 592var middleware = TestUtils.CreateTestMiddleware(testSink: sink); 593var context = TestUtils.CreateTestContext(); 607var middleware = TestUtils.CreateTestMiddleware(testSink: sink, cache: cache); 608var context = TestUtils.CreateTestContext(cache: cache); 623TestUtils.AssertLoggedMessages( 635var middleware = TestUtils.CreateTestMiddleware(testSink: sink, cache: cache); 636var context = TestUtils.CreateTestContext(cache: cache); 652TestUtils.AssertLoggedMessages( 664var middleware = TestUtils.CreateTestMiddleware(testSink: sink, cache: cache); 665var context = TestUtils.CreateTestContext(cache: cache); 685TestUtils.AssertLoggedMessages( 695var middleware = TestUtils.CreateTestMiddleware(testSink: sink, cache: cache); 696var context = TestUtils.CreateTestContext(cache: cache); 710TestUtils.AssertLoggedMessages( 720var middleware = TestUtils.CreateTestMiddleware(testSink: sink, cache: cache); 721var context = TestUtils.CreateTestContext(cache: cache); 731TestUtils.AssertLoggedMessages( 741var middleware = TestUtils.CreateTestMiddleware(testSink: sink, cache: cache); 742var context = TestUtils.CreateTestContext(cache: cache); 752TestUtils.AssertLoggedMessages( 761var middleware = TestUtils.CreateTestMiddleware( 768var context = TestUtils.CreateTestContext(); 782TestUtils.AssertLoggedMessages( 794var context = TestUtils.CreateTestContext(httpContext); 819var middleware = TestUtils.CreateTestMiddleware(options: options, next: async c => 831var context1 = TestUtils.CreateTestContext(); 835var context2 = TestUtils.CreateTestContext(); 867var middleware = TestUtils.CreateTestMiddleware(options: options, next: async c => 882var context1 = TestUtils.CreateTestContext(); 887var context2 = TestUtils.CreateTestContext(); 927var middleware = TestUtils.CreateTestMiddleware(options: options, next: async c => 946var context1 = TestUtils.CreateTestContext(); 950var context2 = TestUtils.CreateTestContext(); 968var middleware = TestUtils.CreateTestMiddleware(testSink: sink, cache: cache); 969var context = TestUtils.CreateTestContext(cache: cache); 986TestUtils.AssertLoggedMessages( 1023var middleware = TestUtils.CreateTestMiddleware(options: options, testSink: sink, cache: cache, next: async c => 1042var requestContext = TestUtils.CreateTestContext(cache: cache);
OutputCachePoliciesTests.cs (23)
14var context = TestUtils.CreateUninitializedContext(); 25var context = TestUtils.CreateUninitializedContext(); 36var context = TestUtils.CreateUninitializedContext(); 47var context = TestUtils.CreateUninitializedContext(); 58var context = TestUtils.CreateUninitializedContext(); 70var context = TestUtils.CreateUninitializedContext(); 82var context = TestUtils.CreateUninitializedContext(); 93var context = TestUtils.CreateUninitializedContext(); 104var context = TestUtils.CreateUninitializedContext(); 115var context = TestUtils.CreateUninitializedContext(); 126var context = TestUtils.CreateUninitializedContext(); 141var context = TestUtils.CreateUninitializedContext(); 154var context = TestUtils.CreateUninitializedContext(options: options); 172var context = TestUtils.CreateUninitializedContext(); 185var context = TestUtils.CreateUninitializedContext(); 197var context = TestUtils.CreateUninitializedContext(); 210var context = TestUtils.CreateUninitializedContext(); 223var context = TestUtils.CreateUninitializedContext(); 235var context = TestUtils.CreateUninitializedContext(); 248var context = TestUtils.CreateUninitializedContext(); 261var context = TestUtils.CreateUninitializedContext(); 274var context = TestUtils.CreateUninitializedContext(); 287var context = TestUtils.CreateUninitializedContext();
OutputCachePolicyBuilderTests.cs (24)
32var context = TestUtils.CreateUninitializedContext(); 46var context = TestUtils.CreateUninitializedContext(); 63var context = TestUtils.CreateUninitializedContext(options: options); 81var context = TestUtils.CreateUninitializedContext(options: options); 94var context = TestUtils.CreateUninitializedContext(); 106var context = TestUtils.CreateUninitializedContext(); 123var context = TestUtils.CreateUninitializedContext(); 139var context = TestUtils.CreateUninitializedContext(); 159var context = TestUtils.CreateUninitializedContext(); 179var context = TestUtils.CreateUninitializedContext(); 199var context1 = TestUtils.CreateUninitializedContext(); 200var context2 = TestUtils.CreateUninitializedContext(); 201var context3 = TestUtils.CreateUninitializedContext(); 219var context = TestUtils.CreateUninitializedContext(); 239var context = TestUtils.CreateUninitializedContext(); 253var context = TestUtils.CreateUninitializedContext(); 265var context = TestUtils.CreateUninitializedContext(); 277var context = TestUtils.CreateUninitializedContext(); 289var context = TestUtils.CreateUninitializedContext(); 304var context = TestUtils.CreateUninitializedContext(); 316var context = TestUtils.CreateUninitializedContext(); 337var context = TestUtils.CreateUninitializedContext(options: options); 355var context = TestUtils.CreateUninitializedContext(options: options); 373var context = TestUtils.CreateUninitializedContext(options: options);
OutputCachePolicyProviderTests.cs (17)
47var context = TestUtils.CreateTestContext(testSink: sink); 66var context = TestUtils.CreateTestContext(testSink: sink); 80var context = TestUtils.CreateTestContext(testSink: sink); 96var context = TestUtils.CreateTestContext(testSink: sink); 114var context = TestUtils.CreateTestContext(testSink: sink); 130var context = TestUtils.CreateTestContext(testSink: sink); 144var context = TestUtils.CreateTestContext(testSink: sink); 162var context = TestUtils.CreateTestContext(testSink: sink); 180var context = TestUtils.CreateTestContext(testSink: sink); 198var context = TestUtils.CreateTestContext(testSink: sink); 212var context = TestUtils.CreateTestContext(testSink: sink); 226var context = TestUtils.CreateTestContext(testSink: sink); 245var context = TestUtils.CreateTestContext(testSink: sink); 321var context = TestUtils.CreateTestContext(testSink: sink); 335var context = TestUtils.CreateTestContext(testSink: sink); 355var context = TestUtils.CreateTestContext(testSink: sink); 378var context = TestUtils.CreateTestContext(testSink: sink);
OutputCacheTests.cs (63)
19var builders = TestUtils.CreateBuildersWithOutputCaching(); 29var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 30var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 41var builders = TestUtils.CreateBuildersWithOutputCaching(); 51var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 52var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "different")); 61var builders = TestUtils.CreateBuildersWithOutputCaching(); 81var builders = TestUtils.CreateBuildersWithOutputCaching(); 101var builders = TestUtils.CreateBuildersWithOutputCaching(); 123var builders = TestUtils.CreateBuildersWithOutputCaching(); 134var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 137var cachedResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 143var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 154var builders = TestUtils.CreateBuildersWithOutputCaching(); 165var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 168var cachedResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 174var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 185var builders = TestUtils.CreateBuildersWithOutputCaching(); 195var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "path")); 196var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "PATH")); 208var builders = TestUtils.CreateBuildersWithOutputCaching(options: options); 218var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "path")); 219var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "PATH")); 235var builders = TestUtils.CreateBuildersWithOutputCaching(options: options); 245var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 247var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 258var builders = TestUtils.CreateBuildersWithOutputCaching(); 269var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 270var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 283var builders = TestUtils.CreateBuildersWithOutputCaching(options: options); 297var initialResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 298var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest(method, "")); 307var builders = TestUtils.CreateBuildersWithOutputCaching(contextAction: context => context.Response.Headers.Vary = HeaderNames.From); 331var builders = TestUtils.CreateBuildersWithOutputCaching(options: options); 356var builders = TestUtils.CreateBuildersWithOutputCaching(options: options); 379var builders = TestUtils.CreateBuildersWithOutputCaching(options: options); 402var builders = TestUtils.CreateBuildersWithOutputCaching(options: options); 425var builders = TestUtils.CreateBuildersWithOutputCaching(options: options); 448var builders = TestUtils.CreateBuildersWithOutputCaching(options: options); 470var builders = TestUtils.CreateBuildersWithOutputCaching(options: options); 493var builders = TestUtils.CreateBuildersWithOutputCaching(options: options); 515var builders = TestUtils.CreateBuildersWithOutputCaching(options: options); 537var builders = TestUtils.CreateBuildersWithOutputCaching(options: options); 557var builders = TestUtils.CreateBuildersWithOutputCaching(); 581var builders = TestUtils.CreateBuildersWithOutputCaching(); 606var builders = TestUtils.CreateBuildersWithOutputCaching(contextAction: context => context.Response.Headers.SetCookie = "cookieName=cookieValue"); 626var builders = TestUtils.CreateBuildersWithOutputCaching(); 650var builders = TestUtils.CreateBuildersWithOutputCaching(); 674var builders = TestUtils.CreateBuildersWithOutputCaching(contextAction: context => context.Response.Headers.CacheControl = CacheControlHeaderValue.NoStoreString); 694var builders = TestUtils.CreateBuildersWithOutputCaching(contextAction: context => 723var builders = TestUtils.CreateBuildersWithOutputCaching(); 744var builders = TestUtils.CreateBuildersWithOutputCaching(contextAction: context => 772var builders = TestUtils.CreateBuildersWithOutputCaching(contextAction: context => context.Response.GetTypedHeaders().ETag = new EntityTagHeaderValue("\"E1\"")); 799var builders = TestUtils.CreateBuildersWithOutputCaching(options: options); 819var builders = TestUtils.CreateBuildersWithOutputCaching(options: new OutputCacheOptions() 842var builders = TestUtils.CreateBuildersWithOutputCaching(options: new OutputCacheOptions() 865var builders = TestUtils.CreateBuildersWithOutputCaching(contextAction: context => context.Response.Headers.Vary = HeaderNames.From); 889var builders = TestUtils.CreateBuildersWithOutputCaching(contextAction: context => context.Response.Headers.Vary = context.Request.Headers.Pragma); 922var builders = TestUtils.CreateBuildersWithOutputCaching(); 932var initialResponse = await client.SendAsync(TestUtils.CreateRequest("HEAD", "?contentLength=10")); 933var subsequentResponse = await client.SendAsync(TestUtils.CreateRequest("HEAD", "?contentLength=10")); 942var builders = TestUtils.CreateBuildersWithOutputCaching(contextAction: _ => throw new SomeException()); 971var builders = TestUtils.CreateBuildersWithOutputCaching();