mirror of
				https://github.com/microsoft/autogen.git
				synced 2025-10-31 01:40:58 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			837 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			837 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);
 | |
|     }
 | |
| }
 | 
