5 instantiations of LeafContent
Microsoft.Extensions.AI.Abstractions.Tests (5)
20 references to LeafContent
Microsoft.Extensions.AI.Abstractions.Tests (20)
Utilities\AIJsonUtilitiesTests.cs (20)
1308options.AddAIContentType<LeafContent>("leaf");
1312options.AddAIContentType(typeof(LeafContent), "leaf");
1318Assert.Contains(derivedAIContentTypes, dt => dt.DerivedType == typeof(LeafContent));
1319Assert.Contains(aiContentTypes, dt => dt.DerivedType == typeof(LeafContent));
1328LeafContent deserializedDc = Assert.IsType<LeafContent>(JsonSerializer.Deserialize<DerivedAIContent>(json, options));
1339LeafContent deserializedAc = Assert.IsType<LeafContent>(JsonSerializer.Deserialize<AIContent>(json2, options));
1404options.AddAIContentType<LeafContent>("leaf");
1410Assert.Contains(aiContentDerivedTypes, dt => dt.DerivedType == typeof(LeafContent));
1411Assert.Contains(derivedAIContentTypes, dt => dt.DerivedType == typeof(LeafContent));
1424LeafContent deserializedLeaf = Assert.IsType<LeafContent>(JsonSerializer.Deserialize<DerivedAIContent>(json2, options));
1432LeafContent deserializedAc = Assert.IsType<LeafContent>(JsonSerializer.Deserialize<AIContent>(json3, options));
1450options.AddAIContentType<LeafContent>("leaf");
1455Assert.Contains(aiContentDerivedTypes, dt => dt.DerivedType == typeof(LeafContent));
1457Assert.Contains(derivedAIContentTypes, dt => dt.DerivedType == typeof(LeafContent));
1463Assert.IsType<LeafContent>(JsonSerializer.Deserialize<AIContent>(json, options));
1944[JsonSerializable(typeof(LeafContent))]