Commit f974d27
committed
test(audience-sdk): centralise SessionTests sabotage message and DiskStoreTests inline JSON keys
SessionTests had "track explode" inline four times as the
InvalidOperationException message thrown by ThrowingTrack delegates
across four session lifecycle scenarios. Adds a TrackExplodeMessage
file-local const at the top of the fixture and migrates all four.
DiskStoreTests built a Purchase-shaped JSON payload by hand-rolling
the wire format with inline keys ("type", "eventName", "anonymousId",
"userId", "properties", "currency", "value") and inline values
("track", "purchase", "USD", "a"). Replaces those with the SDK's
existing constants (MessageFields.*, MessageTypes.Track,
EventNames.Purchase, EventPropertyKeys.Currency / .Value) and the
TestFixtures fixtures already centralised (UsdCurrency,
TestEventNames.PlaceholderA).
The "u" userId placeholder is left inline; centralising a single
one-char placeholder would add more noise than it removes.
Per the user's "everything random goes in a constant" stance.
Follow-up to SDK-272 (centralisation of duplicated literals).1 parent 13793cb commit f974d27
2 files changed
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
546 | 549 | | |
547 | 550 | | |
548 | 551 | | |
549 | | - | |
| 552 | + | |
550 | 553 | | |
551 | 554 | | |
552 | 555 | | |
| |||
581 | 584 | | |
582 | 585 | | |
583 | 586 | | |
584 | | - | |
| 587 | + | |
585 | 588 | | |
586 | 589 | | |
587 | 590 | | |
| |||
616 | 619 | | |
617 | 620 | | |
618 | 621 | | |
619 | | - | |
| 622 | + | |
620 | 623 | | |
621 | 624 | | |
622 | 625 | | |
| |||
652 | 655 | | |
653 | 656 | | |
654 | 657 | | |
655 | | - | |
| 658 | + | |
656 | 659 | | |
657 | 660 | | |
658 | 661 | | |
| |||
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
212 | 217 | | |
213 | 218 | | |
214 | 219 | | |
| |||
0 commit comments