Base:
11 references to Equals
Microsoft.Extensions.AI.Abstractions.Tests (11)
ChatCompletion\ChatResponseFormatTests.cs (11)
56Assert.True(ChatResponseFormat.Json.Equals(ChatResponseFormat.Json)); 57Assert.False(ChatResponseFormat.Json.Equals(ChatResponseFormat.Text)); 58Assert.False(ChatResponseFormat.Json.Equals(new ChatResponseFormatJson("{}"))); 60Assert.True(ChatResponseFormat.Json.Equals(new ChatResponseFormatJson(null))); 63Assert.True(new ChatResponseFormatJson("{}").Equals(new ChatResponseFormatJson("{}"))); 66Assert.False(new ChatResponseFormatJson("""{ "prop": 42 }""").Equals(new ChatResponseFormatJson("""{ "prop": 43 }"""))); 69Assert.False(new ChatResponseFormatJson("""{ "prop": 42 }""").Equals(new ChatResponseFormatJson("""{ "PROP": 42 }"""))); 72Assert.True(new ChatResponseFormatJson("{}", "name", "description").Equals(new ChatResponseFormatJson("{}", "name", "description"))); 73Assert.False(new ChatResponseFormatJson("{}", "name", "description").Equals(new ChatResponseFormatJson("{}", "name", "description2"))); 74Assert.False(new ChatResponseFormatJson("{}", "name", "description").Equals(new ChatResponseFormatJson("{}", "name2", "description"))); 75Assert.False(new ChatResponseFormatJson("{}", "name", "description").Equals(new ChatResponseFormatJson("{}", "name2", "description2")));