diff --git a/src/AnthropicClient/AnthropicClient.csproj b/src/AnthropicClient/AnthropicClient.csproj index 17149b5..6e77cb6 100644 --- a/src/AnthropicClient/AnthropicClient.csproj +++ b/src/AnthropicClient/AnthropicClient.csproj @@ -35,7 +35,7 @@ - + diff --git a/tests/AnthropicClient.Tests/AnthropicClient.Tests.csproj b/tests/AnthropicClient.Tests/AnthropicClient.Tests.csproj index c5ad00c..0a5f3db 100644 --- a/tests/AnthropicClient.Tests/AnthropicClient.Tests.csproj +++ b/tests/AnthropicClient.Tests/AnthropicClient.Tests.csproj @@ -10,21 +10,21 @@ - + - + - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tests/AnthropicClient.Tests/Unit/Models/ToolTests.cs b/tests/AnthropicClient.Tests/Unit/Models/ToolTests.cs index ba026b6..bf71ca2 100644 --- a/tests/AnthropicClient.Tests/Unit/Models/ToolTests.cs +++ b/tests/AnthropicClient.Tests/Unit/Models/ToolTests.cs @@ -8,11 +8,11 @@ public class ToolTests : SerializationTest [InlineData(null)] [InlineData("")] [InlineData(" ")] - public void Constructor_WhenGivenInvalidNameValue_ItShouldThrowArgumentException(string name) + public void Constructor_WhenGivenInvalidNameValue_ItShouldThrowArgumentException(string? name) { var method = () => true; var function = new AnthropicFunction(method.Method); - var action = () => new Tool(name, "description", function); + var action = () => new Tool(name!, "description", function); action.Should().Throw(); } @@ -21,11 +21,11 @@ public class ToolTests : SerializationTest [InlineData(null)] [InlineData("")] [InlineData(" ")] - public void Constructor_WhenGivenInvalidDescriptionValue_ItShouldThrowArgumentException(string description) + public void Constructor_WhenGivenInvalidDescriptionValue_ItShouldThrowArgumentException(string? description) { var method = () => true; var function = new AnthropicFunction(method.Method); - var action = () => new Tool("name", description, function); + var action = () => new Tool("name", description!, function); action.Should().Throw(); } @@ -86,9 +86,9 @@ public class ToolTests : SerializationTest [InlineData(typeof(TestClass), "")] [InlineData(typeof(TestClass), " ")] [InlineData(typeof(TestClass), "MadeUpMethod")] - public void CreateFromStaticMethod_WhenGivenInvalidMethodName_ItShouldThrowArgumentException(Type type, string methodName) + public void CreateFromStaticMethod_WhenGivenInvalidMethodName_ItShouldThrowArgumentException(Type type, string? methodName) { - var action = () => Tool.CreateFromStaticMethod("name", "description", type, methodName); + var action = () => Tool.CreateFromStaticMethod("name", "description", type, methodName!); action.Should().Throw(); } @@ -158,9 +158,9 @@ public class ToolTests : SerializationTest [InlineData("")] [InlineData(" ")] [InlineData("MadeUpMethod")] - public void CreateFromInstanceMethod_WhenGivenInvalidMethodName_ItShouldThrowArgumentException(string methodName) + public void CreateFromInstanceMethod_WhenGivenInvalidMethodName_ItShouldThrowArgumentException(string? methodName) { - var action = () => Tool.CreateFromInstanceMethod("name", "description", new TestClass(), methodName); + var action = () => Tool.CreateFromInstanceMethod("name", "description", new TestClass(), methodName!); action.Should().Throw(); }