Skip to content

Commit

Permalink
chore: add ManagedReference YAML roundtrip tests
Browse files Browse the repository at this point in the history
  • Loading branch information
filzrev committed Sep 26, 2024
1 parent 19e7a97 commit 46ab297
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/Docfx.Common/Json/JsonUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ private static bool IsSupported()
case "Docfx.DataContracts.ManagedReference.PageViewModel":
return true;

case "Docfx.DataContracts.ManagedReference.PageViewModel":
return false; // TODO: Need to support ExtensionData

// Intermediate types for tests. it's expected to be removed later (And return true by default).
case "Docfx.Plugins.MarkdownServiceProperties":
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public void YamlSerializationTest_ManagedReference(string path)
var model = TestData.Load<PageViewModel>(path);

// Act/Assert
ValidateYamlRoundTrip(model);
ValidateYamlJsonRoundTrip(model);
ValidateYamlRoundTripWithJson(model);
}
}

0 comments on commit 46ab297

Please sign in to comment.