17 references to AssertExtensions
Microsoft.Extensions.AI.Tests (17)
ChatCompletion\FunctionInvokingChatClientTests.cs (4)
553
AssertExtensions
.EqualFunctionCallParameters(expectedFunctionCall.Arguments, chatFunctionCall.Arguments);
558
AssertExtensions
.EqualFunctionCallResults(expectedFunctionResult.Result, chatFunctionResult.Result);
620
AssertExtensions
.EqualFunctionCallParameters(expectedFunctionCall.Arguments, chatFunctionCall.Arguments);
625
AssertExtensions
.EqualFunctionCallResults(expectedFunctionResult.Result, chatFunctionResult.Result);
Functions\AIFunctionFactoryTest.cs (13)
31
AssertExtensions
.EqualFunctionCallResults("test test", await func.InvokeAsync([new KeyValuePair<string, object?>("a", "test")]));
34
AssertExtensions
.EqualFunctionCallResults("hello world", await func.InvokeAsync([new KeyValuePair<string, object?>("b", "hello"), new KeyValuePair<string, object?>("a", "world")]));
37
AssertExtensions
.EqualFunctionCallResults(3L, await func.InvokeAsync([new KeyValuePair<string, object?>("a", 1), new KeyValuePair<string, object?>("b", 2L)]));
44
AssertExtensions
.EqualFunctionCallResults("test test", await func.InvokeAsync());
45
AssertExtensions
.EqualFunctionCallResults("hello hello", await func.InvokeAsync([new KeyValuePair<string, object?>("a", "hello")]));
62
AssertExtensions
.EqualFunctionCallResults(null, await func.InvokeAsync(cancellationToken: cts.Token));
72
AssertExtensions
.EqualFunctionCallResults(null, await func.InvokeAsync(new Dictionary<string, object?> { ["somethingFirst"] = 1, ["ctx"] = new AIFunctionContext() }, cts.Token));
82
AssertExtensions
.EqualFunctionCallResults(null, await func.InvokeAsync(cancellationToken: cts.Token));
92
AssertExtensions
.EqualFunctionCallResults("test test", await func.InvokeAsync([new KeyValuePair<string, object?>("a", "test")]));
95
AssertExtensions
.EqualFunctionCallResults("hello world", await func.InvokeAsync([new KeyValuePair<string, object?>("b", "hello"), new KeyValuePair<string, object?>("a", "world")]));
99
AssertExtensions
.EqualFunctionCallResults(null, await func.InvokeAsync([new KeyValuePair<string, object?>("a", 1), new KeyValuePair<string, object?>("b", 2L)]));
104
AssertExtensions
.EqualFunctionCallResults(null, await func.InvokeAsync([new KeyValuePair<string, object?>("a", 1), new KeyValuePair<string, object?>("b", 2L)]));
108
AssertExtensions
.EqualFunctionCallResults(new int[] { 0, 1, 2, 3, 4 }, await func.InvokeAsync([new("count", 5)]));