Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added unit test to validate JsonStringEnumConverter working as expected #1174

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

WhitWaldo
Copy link
Contributor

Description

I prefer the JsonSerializer retaining the string over int values for enums, so when I saw the bug reported in #1160 , I though I'd go ahead and tackle it. While I was unable to reproduce the experienced issue, I went ahead and added a unit test to the suite to prove out that this experience both works as-is and doesn't break going forward.

Issue reference

Please reference the issue this PR will close: #1160

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

* [ ] Code compiles correctly

  • Created/updated tests
    * [ ] Extended the documentation

…uring event publish

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
@WhitWaldo WhitWaldo requested review from a team as code owners October 24, 2023 04:25
Copy link

codecov bot commented Nov 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bb3f97a) 66.53% compared to head (1f483b9) 66.53%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1174   +/-   ##
=======================================
  Coverage   66.53%   66.53%           
=======================================
  Files         171      171           
  Lines        5752     5752           
  Branches      626      626           
=======================================
  Hits         3827     3827           
  Misses       1776     1776           
  Partials      149      149           
Flag Coverage Δ
net6 48.00% <ø> (-18.53%) ⬇️
net7 66.52% <ø> (ø)
net8 66.52% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@halspang halspang merged commit e435efd into dapr:master Nov 28, 2023
12 checks passed
@WhitWaldo WhitWaldo deleted the json-enum-value-serializer branch November 30, 2023 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Dapr not handling enums as string in pub/sub with JsonSerializerOptions
2 participants