feat: create chat message

This commit is contained in:
Stevan Freeborn
2024-06-27 23:26:53 -05:00
parent 68b359163d
commit 4c2cee643a
77 changed files with 3860 additions and 0 deletions
@@ -0,0 +1,38 @@
namespace AnthropicClient.Tests.Unit.Models;
public class AutoToolChoiceTests : SerializationTest
{
private readonly string _testJson = @"{
""type"": ""auto""
}";
[Fact]
public void Constructor_WhenCalled_ItShouldSetTypeToAuto()
{
var expected = "auto";
var actual = new AutoToolChoice();
actual.Type.Should().Be(expected);
}
[Fact]
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
{
var choice = new AutoToolChoice();
var actual = Serialize(choice);
JsonAssert.Equal(_testJson, actual);
}
[Fact]
public void JsonDeserialization_WhenDeserialized_ItShouldHaveExpectedShape()
{
var expected = new AutoToolChoice();
var actual = Deserialize<AutoToolChoice>(_testJson);
actual.Should().BeEquivalentTo(expected);
}
}