Skip to content

Commit 3bf92fe

Browse files
test(audience-sdk): centralise EventQueueTests Msg helper key
EventQueueTests' local Msg helper labelled its dict's event-name field with an inline "event" key. The string is distinct from the SDK's wire-format MessageFields.EventName ("eventName"); EventQueue accepts arbitrary dicts so the test could pick anything. Inline made this implicit. Adds a file-local MsgEventKey const at the top of the fixture with a comment noting the test-scaffolding role and migrates the one usage. Per the user's "everything random goes in a constant" stance. Follow-up to SDK-272 (centralisation of duplicated literals).
1 parent 1e61ecc commit 3bf92fe

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Packages/Audience/Tests/Runtime/Transport/EventQueueTests.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ namespace Immutable.Audience.Tests
99
[TestFixture]
1010
internal class EventQueueTests
1111
{
12+
// Test-scaffold key used by the local Msg helper, not MessageFields.EventName.
13+
private const string MsgEventKey = "event";
14+
1215
private string _testDir;
1316
private DiskStore _store;
1417

@@ -28,7 +31,7 @@ public void TearDown()
2831
}
2932

3033
private static Dictionary<string, object> Msg(string evt) =>
31-
new Dictionary<string, object> { ["event"] = evt };
34+
new Dictionary<string, object> { [MsgEventKey] = evt };
3235

3336
[Test]
3437
public void Enqueue_ThenFlushSync_PersistesEventToDisk()

0 commit comments

Comments
 (0)