@@ -258,7 +258,7 @@ public void MockDistributedCacheShouldBeDifferentForEveryCallSynchronously()
258
258
}
259
259
260
260
[ Fact ]
261
- public void MockDistributedCacheShouldBeDifferentForEveryCallSynchronouslyWithCachedControllerBuilder ( )
261
+ public void MockDistributedCacheShouldBeSameForEveryCallSynchronouslyWithCachedControllerBuilder ( )
262
262
{
263
263
MyApplication
264
264
. StartsFrom < DefaultStartup > ( )
@@ -277,7 +277,7 @@ public void MockDistributedCacheShouldBeDifferentForEveryCallSynchronouslyWithCa
277
277
. WithDistributedCache ( cache => cache . WithEntry ( string . Empty , new byte [ ] { } ) )
278
278
. Calling ( c => c . DistributedCacheAction ( ) )
279
279
. ShouldReturn ( )
280
- . BadRequest ( ) ;
280
+ . Ok ( ) ;
281
281
282
282
MyApplication . StartsFrom < DefaultStartup > ( ) ;
283
283
}
@@ -329,7 +329,7 @@ public void ExplicitMockDistributedCacheShouldOverrideIt()
329
329
}
330
330
331
331
[ Fact ]
332
- public void MockDistributedCacheShouldBeDifferentForEveryCallAsynchronously ( )
332
+ public void MockDistributedCacheShouldBeSameForAsyncronousCallToTestProvider ( )
333
333
{
334
334
Task
335
335
. Run ( async ( ) =>
@@ -354,36 +354,36 @@ public void MockDistributedCacheShouldBeDifferentForEveryCallAsynchronously()
354
354
Task . Run ( ( ) =>
355
355
{
356
356
var distributedCache = TestServiceProvider . GetService < IDistributedCache > ( ) ;
357
- distributedCache . Set ( "test " , new byte [ ] { 1 } ) ;
358
- firstValue = TestServiceProvider . GetService < IDistributedCache > ( ) . Get ( "test " ) ;
357
+ distributedCache . Set ( "test1 " , new byte [ ] { 1 } ) ;
358
+ firstValue = TestServiceProvider . GetService < IDistributedCache > ( ) . Get ( "test1 " ) ;
359
359
TestHelper . ExecuteTestCleanup ( ) ;
360
360
} ) ,
361
361
Task . Run ( ( ) =>
362
362
{
363
363
var distributedCache = TestServiceProvider . GetService < IDistributedCache > ( ) ;
364
- distributedCache . Set ( "test " , new byte [ ] { 2 } ) ;
365
- secondValue = TestServiceProvider . GetService < IDistributedCache > ( ) . Get ( "test " ) ;
364
+ distributedCache . Set ( "test2 " , new byte [ ] { 2 } ) ;
365
+ secondValue = TestServiceProvider . GetService < IDistributedCache > ( ) . Get ( "test2 " ) ;
366
366
TestHelper . ExecuteTestCleanup ( ) ;
367
367
} ) ,
368
368
Task . Run ( ( ) =>
369
369
{
370
370
var distributedCache = TestServiceProvider . GetService < IDistributedCache > ( ) ;
371
- distributedCache . Set ( "test " , new byte [ ] { 3 } ) ;
372
- thirdValue = TestServiceProvider . GetService < IDistributedCache > ( ) . Get ( "test " ) ;
371
+ distributedCache . Set ( "test3 " , new byte [ ] { 3 } ) ;
372
+ thirdValue = TestServiceProvider . GetService < IDistributedCache > ( ) . Get ( "test3 " ) ;
373
373
TestHelper . ExecuteTestCleanup ( ) ;
374
374
} ) ,
375
375
Task . Run ( ( ) =>
376
376
{
377
377
var distributedCache = TestServiceProvider . GetService < IDistributedCache > ( ) ;
378
- distributedCache . Set ( "test " , new byte [ ] { 4 } ) ;
379
- fourthValue = TestServiceProvider . GetService < IDistributedCache > ( ) . Get ( "test " ) ;
378
+ distributedCache . Set ( "test4 " , new byte [ ] { 4 } ) ;
379
+ fourthValue = TestServiceProvider . GetService < IDistributedCache > ( ) . Get ( "test4 " ) ;
380
380
TestHelper . ExecuteTestCleanup ( ) ;
381
381
} ) ,
382
382
Task . Run ( ( ) =>
383
383
{
384
384
var distributedCache = TestServiceProvider . GetService < IDistributedCache > ( ) ;
385
- distributedCache . Set ( "test " , new byte [ ] { 5 } ) ;
386
- fifthValue = TestServiceProvider . GetService < IDistributedCache > ( ) . Get ( "test " ) ;
385
+ distributedCache . Set ( "test5 " , new byte [ ] { 5 } ) ;
386
+ fifthValue = TestServiceProvider . GetService < IDistributedCache > ( ) . Get ( "test5 " ) ;
387
387
TestHelper . ExecuteTestCleanup ( ) ;
388
388
} )
389
389
} ;
0 commit comments