Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
Enhance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Omondi committed Nov 10, 2023
1 parent f6ac9da commit 3afe819
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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);
Expand Down

0 comments on commit 3afe819

Please sign in to comment.