Skip to content

Commit

Permalink
baggageTests - semi auto cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kielek committed Aug 30, 2024
1 parent 8918cd4 commit 1dd9470
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/OpenTelemetry.Api.Tests/BaggageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public void SetAndGetTest()
{
var list = new List<KeyValuePair<string, string>>(2)
{
new KeyValuePair<string, string>(K1, V1),
new KeyValuePair<string, string>(K2, V2),
new(K1, V1),
new(K2, V2),
};

Baggage.SetBaggage(K1, V1);
Expand All @@ -52,7 +52,7 @@ public void SetExistingKeyTest()
{
var list = new List<KeyValuePair<string, string>>(2)
{
new KeyValuePair<string, string>(K1, V1),
new(K1, V1),
};

Baggage.Current.SetBaggage(new KeyValuePair<string, string?>(K1, V1));
Expand Down Expand Up @@ -151,8 +151,8 @@ public void EnumeratorTest()
{
var list = new List<KeyValuePair<string, string>>(2)
{
new KeyValuePair<string, string>(K1, V1),
new KeyValuePair<string, string>(K2, V2),
new(K1, V1),
new(K2, V2),
};

var baggage = Baggage.SetBaggage(K1, V1);
Expand All @@ -178,11 +178,11 @@ public void EnumeratorTest()
[Fact]
public void EqualsTest()
{
var bc1 = new Baggage(new Dictionary<string, string>() { [K1] = V1, [K2] = V2 });
var bc2 = new Baggage(new Dictionary<string, string>() { [K1] = V1, [K2] = V2 });
var bc3 = new Baggage(new Dictionary<string, string>() { [K2] = V2, [K1] = V1 });
var bc4 = new Baggage(new Dictionary<string, string>() { [K1] = V1, [K2] = V1 });
var bc5 = new Baggage(new Dictionary<string, string>() { [K1] = V2, [K2] = V1 });
var bc1 = new Baggage(new Dictionary<string, string> { [K1] = V1, [K2] = V2 });
var bc2 = new Baggage(new Dictionary<string, string> { [K1] = V1, [K2] = V2 });
var bc3 = new Baggage(new Dictionary<string, string> { [K2] = V2, [K1] = V1 });
var bc4 = new Baggage(new Dictionary<string, string> { [K1] = V1, [K2] = V1 });
var bc5 = new Baggage(new Dictionary<string, string> { [K1] = V2, [K2] = V1 });

Assert.True(bc1.Equals(bc2));

Expand Down

0 comments on commit 1dd9470

Please sign in to comment.