Browse Source
Update CorrelationIdProvider_Tests.cs
pull/16795/head
maliming
3 years ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
3 additions and
4 deletions
-
framework/test/Volo.Abp.Core.Tests/Volo/Abp/CorrelationIdProvider/CorrelationIdProvider_Tests.cs
|
|
|
@ -18,8 +18,8 @@ public class CorrelationIdProvider_Tests |
|
|
|
await application.InitializeAsync(); |
|
|
|
|
|
|
|
var correlationIdProvider = application.ServiceProvider.GetRequiredService<ICorrelationIdProvider>(); |
|
|
|
var currentCorrelationId = correlationIdProvider.Get(); |
|
|
|
currentCorrelationId.ShouldNotBeNull(); |
|
|
|
|
|
|
|
correlationIdProvider.Get().ShouldBeNull(); |
|
|
|
|
|
|
|
var correlationId = Guid.NewGuid().ToString("N"); |
|
|
|
using (correlationIdProvider.Change(correlationId)) |
|
|
|
@ -27,8 +27,7 @@ public class CorrelationIdProvider_Tests |
|
|
|
correlationIdProvider.Get().ShouldBe(correlationId); |
|
|
|
} |
|
|
|
|
|
|
|
//The default correlation id always changes.
|
|
|
|
correlationIdProvider.Get().ShouldNotBe(currentCorrelationId); |
|
|
|
correlationIdProvider.Get().ShouldBeNull(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|