Turn on the AOT analyzer. (#92)
* Turn on the AOT analyzer. * Address feedback * Add missing types. * Fix build and react to conflicts. * Fix failing test. * Address feedback.
This commit is contained in:
parent
c0e1d0dd9a
commit
e7fa6194f6
4 changed files with 522 additions and 68 deletions
|
|
@ -2,7 +2,6 @@
|
|||
using McpDotNet.Protocol.Types;
|
||||
using McpDotNet.Server;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Logging.Abstractions;
|
||||
using Serilog;
|
||||
using System.Text;
|
||||
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ public class McpServerBuilderExtensionsToolsTests
|
|||
|
||||
var tool = result.Tools.First(t => t.Name == "TestTool");
|
||||
Assert.Equal("TestTool", tool.Name);
|
||||
Assert.Empty(tool.Description);
|
||||
Assert.Empty(tool.Description!);
|
||||
Assert.NotNull(tool.InputSchema);
|
||||
Assert.Equal("object", tool.InputSchema.Type);
|
||||
Assert.NotNull(tool.InputSchema.Properties);
|
||||
|
|
|
|||
|
|
@ -603,7 +603,7 @@ public class McpServerTests
|
|||
supportsSampling ? new ClientCapabilities { Sampling = new SamplingCapability() } :
|
||||
null;
|
||||
|
||||
public async Task<T> SendRequestAsync<T>(JsonRpcRequest request, CancellationToken cancellationToken) where T : class
|
||||
public Task<T> SendRequestAsync<T>(JsonRpcRequest request, CancellationToken cancellationToken) where T : class
|
||||
{
|
||||
CreateMessageRequestParams rp = Assert.IsType<CreateMessageRequestParams>(request.Params);
|
||||
|
||||
|
|
@ -627,7 +627,7 @@ public class McpServerTests
|
|||
Role = "assistant",
|
||||
StopReason = "endTurn",
|
||||
};
|
||||
return (T)(object)result;
|
||||
return Task.FromResult((T)(object)result);
|
||||
}
|
||||
|
||||
public ValueTask DisposeAsync() => default;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using McpDotNet.Configuration;
|
|||
using McpDotNet.Protocol.Transport;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace McpDotNet.Tests;
|
||||
|
||||
|
|
@ -37,6 +38,7 @@ public class SseServerIntegrationTestFixture : IDisposable
|
|||
Start();
|
||||
}
|
||||
|
||||
[MemberNotNull(nameof(_process))]
|
||||
public void Start()
|
||||
{
|
||||
// Start the server (which is at TestSseServer.exe on windows and "dotnet TestSseServer.dll" on linux)
|
||||
|
|
|
|||
Loading…
Reference in a new issue