Base:
10 references to GetHashCode
Microsoft.Extensions.AI.Abstractions.Tests (10)
ChatCompletion\ChatResponseFormatTests.cs (10)
61
Assert.Equal(ChatResponseFormat.Json.
GetHashCode
(), new ChatResponseFormatJson(null).
GetHashCode
());
64
Assert.Equal(new ChatResponseFormatJson("{}").
GetHashCode
(), new ChatResponseFormatJson("{}").
GetHashCode
());
67
Assert.NotEqual(new ChatResponseFormatJson("""{ "prop": 42 }""").
GetHashCode
(), new ChatResponseFormatJson("""{ "prop": 43 }""").
GetHashCode
()); // technically not guaranteed
70
Assert.NotEqual(new ChatResponseFormatJson("""{ "prop": 42 }""").
GetHashCode
(), new ChatResponseFormatJson("""{ "PROP": 42 }""").
GetHashCode
()); // technically not guaranteed
77
Assert.Equal(new ChatResponseFormatJson("{}", "name", "description").
GetHashCode
(), new ChatResponseFormatJson("{}", "name", "description").
GetHashCode
());