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