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 cab3a99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Docfx.Common/Json/JsonUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ private static bool IsSupported()
switch (fullName)
{
case "Docfx.Build.Engine.XRefMap":
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 cab3a99

Please sign in to comment.