Skip to content

Commit f57868e

Browse files
committed
test(transaction): expect SetData via TransactionTracer
1 parent e6e6c9b commit f57868e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/Sentry.Tests/Protocol/SentryTransactionTests.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,15 @@ public void SerializeObject_AllPropertiesSetToNonDefault_SerializesValidObject()
244244

245245
return o;
246246
});
247+
248+
using (_ = new AssertionScope())
249+
{
250+
KeyValuePair<string, string> expectedData = new("extra_key", "extra_value");
251+
finalTransaction.Data.Should().ContainSingle().Which.Should().Be(expectedData);
252+
finalTransaction.Contexts.Trace.Data.Should().ContainSingle().Which.Should().Be(expectedData);
253+
actual.Data.Should().ContainSingle().Which.Should().Be(expectedData);
254+
actual.Contexts.Trace.Data.Should().ContainSingle().Which.Should().Be(expectedData);
255+
}
247256
}
248257

249258
[Fact]

0 commit comments

Comments
 (0)