6 references to AddAIContentType
Microsoft.Extensions.AI.Abstractions.Tests (6)
Utilities\AIJsonUtilitiesTests.cs (6)
390Assert.Throws<ArgumentException>("contentType", () => options.AddAIContentType(typeof(int), "discriminator"));
391Assert.Throws<ArgumentException>("contentType", () => options.AddAIContentType(typeof(object), "discriminator"));
392Assert.Throws<ArgumentException>("contentType", () => options.AddAIContentType(typeof(ChatMessage), "discriminator"));
419Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).AddAIContentType(typeof(DerivedAIContent), "discriminator"));
421Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.AddAIContentType(typeof(DerivedAIContent), null!));
422Assert.Throws<ArgumentNullException>("contentType", () => options.AddAIContentType(null!, "discriminator"));