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 AnyToolChoiceTests : SerializationTest
{
private readonly string _testJson = @"{
""type"": ""any""
}";
[Fact]
public void Constructor_WhenCalled_ItShouldSetTypeToAny()
{
var expected = "any";
var actual = new AnyToolChoice();
actual.Type.Should().Be(expected);
}
[Fact]
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
{
var choice = new AnyToolChoice();
var actual = Serialize(choice);
JsonAssert.Equal(_testJson, actual);
}
[Fact]
public void JsonDeserialization_WhenDeserialized_ItShouldHaveExpectedShape()
{
var expected = new AnyToolChoice();
var actual = Deserialize<AnyToolChoice>(_testJson);
actual.Should().BeEquivalentTo(expected);
}
}