mirror of
https://github.com/microsoft/autogen.git
synced 2025-07-28 03:13:27 +00:00

* update * add vertex gemini test * remove DTO * add test for vertexGeminiAgent * update test name * update IGeminiClient interface * add test for streaming * add message connector * add gemini message extension * add tests * update * add gemnini sample * update examples * add test for iamge * fix test * add more tests * add streaming message test * add comment * remove unused json * implement google gemini client * update * fix comment
28 lines
840 B
C#
28 lines
840 B
C#
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// FunctionContractExtensionTests.cs
|
|
|
|
using ApprovalTests;
|
|
using ApprovalTests.Namers;
|
|
using ApprovalTests.Reporters;
|
|
using AutoGen.Gemini.Extension;
|
|
using Google.Protobuf;
|
|
using Xunit;
|
|
|
|
namespace AutoGen.Gemini.Tests;
|
|
|
|
public class FunctionContractExtensionTests
|
|
{
|
|
private readonly Functions functions = new Functions();
|
|
[Fact]
|
|
[UseReporter(typeof(DiffReporter))]
|
|
[UseApprovalSubdirectory("ApprovalTests")]
|
|
public void ItGenerateGetWeatherToolTest()
|
|
{
|
|
var contract = functions.GetWeatherAsyncFunctionContract;
|
|
var tool = contract.ToFunctionDeclaration();
|
|
var formatter = new JsonFormatter(JsonFormatter.Settings.Default.WithIndentation(" "));
|
|
var json = formatter.Format(tool);
|
|
Approvals.Verify(json);
|
|
}
|
|
}
|