From 3afe819e92d862ab65d8a837dbb29cf2661b3bf9 Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Fri, 10 Nov 2023 12:41:08 +0300 Subject: [PATCH] Enhance tests --- .../Middleware/ActivitySourceRegistryTests.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Middleware/ActivitySourceRegistryTests.cs b/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Middleware/ActivitySourceRegistryTests.cs index 02a747a..0314d88 100644 --- a/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Middleware/ActivitySourceRegistryTests.cs +++ b/Microsoft.Kiota.Http.HttpClientLibrary.Tests/Middleware/ActivitySourceRegistryTests.cs @@ -25,6 +25,8 @@ public void CreatesNewInstanceOnFirstCallAndReturnsSameInstance() // They are the same instance Assert.Equal(activitySource, activitySource2); + Assert.Equal("sample source", activitySource.Name); + Assert.Equal("sample source", activitySource2.Name); } [Fact] @@ -33,9 +35,11 @@ public void CreatesDifferentInstances() // Act var activitySource = ActivitySourceRegistry.DefaultInstance.GetOrCreateActivitySource("sample source"); Assert.NotNull(activitySource); + Assert.Equal("sample source", activitySource.Name); var activitySource2 = ActivitySourceRegistry.DefaultInstance.GetOrCreateActivitySource("sample source 2"); Assert.NotNull(activitySource); + Assert.Equal("sample source 2", activitySource2.Name); // They are not the same instance Assert.NotEqual(activitySource, activitySource2);