Added tests to cover all branches of JsonNodeOptions (#436)
authorAnton Landor <55381413+AntonLandor@users.noreply.github.com>
Wed, 11 Dec 2019 07:59:32 +0000 (08:59 +0100)
committerAhson Khan <ahson_ahmedk@yahoo.com>
Wed, 11 Dec 2019 07:59:32 +0000 (23:59 -0800)
commit2c8d4863a774d680d074f8d7da8623abdd147893
tree737022414c081250ccf22894c4e191ef30c28ea9
parentf1890a75f5afc6fbd8e4e0ef966523578a8d2813
Added tests to cover all branches of JsonNodeOptions (#436)

* Added tests to cover all branches of JsonNodeOptions.

* Created a test class for JsonNodeOptions and moved relevant tests to it. Also implemented tests for CommentHandling and AllowTrailingCommas options.

* Added tests for default values. Moved JsonNodeOptionsTests to the correct item group.

* Added test to make sure default JsonNodeOptions have equal values to JsonNodeOptions created from default constructor.

* Added missed options arguments.

* Added assertions to make sure default JsonNodeOptions values are as expected.
src/libraries/System.Text.Json/tests/JsonNode.TraversalTests.cs
src/libraries/System.Text.Json/tests/JsonNodeOptionsTests.cs [new file with mode: 0644]
src/libraries/System.Text.Json/tests/System.Text.Json.Tests.csproj