mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 12:27:21 +00:00
Generated the JSON contracts of the stored data at compile time (#1148)
This commit is contained in:
1 parent
fc7399e81b
commit
e954881fda
75 files changed
+5437
-298
No files matched your search
@@ -10,7 +10,7 @@ public sealed class ContentPresentationTests
|
||||
[Test]
|
||||
public void TheDataHashCodeFollowsNewData()
|
||||
{
|
||||
var presentation = ContentPresentation.Create(ContentPresentationKind.SWOT_ANALYSIS, new { heading = "First" });
|
||||
var presentation = ContentPresentation.Create(ContentPresentationKind.SWOT_ANALYSIS, new { heading = "First" }, JsonSerializerOptions.Default);
|
||||
var firstHashCode = presentation.GetDataHashCode();
|
||||
|
||||
presentation.Data = JsonSerializer.SerializeToElement(new { heading = "Second" });
|
||||
@@ -33,7 +33,7 @@ public sealed class ContentPresentationTests
|
||||
[Test]
|
||||
public void ACloneHasTheSameDataHashCode()
|
||||
{
|
||||
var presentation = ContentPresentation.Create(ContentPresentationKind.SWOT_ANALYSIS, new { heading = "First" });
|
||||
var presentation = ContentPresentation.Create(ContentPresentationKind.SWOT_ANALYSIS, new { heading = "First" }, JsonSerializerOptions.Default);
|
||||
|
||||
Assert.That(presentation.DeepClone().GetDataHashCode(), Is.EqualTo(presentation.GetDataHashCode()));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user