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

Add tests for contract customization per feedback in #70435 #71529

Merged
merged 1 commit into from
Jul 1, 2022

Conversation

krwq
Copy link
Member

@krwq krwq commented Jul 1, 2022

Fixes remaining comments in #70435 - some were already addressed in #71449

  • adds tests for adding property when JsonTypeInfoKind is not Object
  • adds functional tests for Dictionary/List similar to ones added for JsonTypeInfoKind.Object (custom converter and CreateObject tests)

@ghost
Copy link

ghost commented Jul 1, 2022

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes remaining comments in #70435 - some were already addressed in #71449

  • adds tests for adding property when JsonTypeInfoKind is not Object
  • adds functional tests for Dictionary/List similar to ones added for JsonTypeInfoKind.Object (custom converter and CreateObject tests)
Author: krwq
Assignees: krwq
Labels:

area-System.Text.Json

Milestone: -

@@ -287,70 +287,114 @@ public static void SetCustomConverterForAProperty()
}

[Fact]
public static void UntypedCreateObjectWithDefaults()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I merged Untyped and Typed test into one since it was mostly duplicated and therefore some code is removed here

@krwq krwq merged commit 4935319 into dotnet:main Jul 1, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Jul 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants