Commit ba8c062
committed
test(audience-sdk): cover IdentityTypeExtensions.ParseLowercaseString
ParseLowercaseString was added in the SDK-272 stack as the inverse of
ToLowercaseString and consumed by the sample app to map wire strings
back to the enum. It had no direct test, so a typo in any of the eight
case branches or in the Custom fallback would land silently.
Add three parametrised cases:
- Each known enum value maps from its lowercase wire form.
- Mixed-case ("Steam", "STEAM", "Passport") still resolves
via ToLowerInvariant, matching the documented behaviour.
- null, empty, and unknown values fall back to Custom (the parser
never throws so producer code always gets a usable enum).
Follow-up to SDK-272 (centralisation of duplicated literals).1 parent 710a756 commit ba8c062
1 file changed
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
22 | 53 | | |
23 | 54 | | |
24 | 55 | | |
| |||
0 commit comments