feat: add DeleteMessageBatchAsync method and MessageBatchDeleteResponse model with tests

This commit is contained in:
Stevan Freeborn
2025-01-14 13:41:32 -06:00
parent 7ec931dda5
commit 56b3a53a2a
6 changed files with 197 additions and 91 deletions
@@ -0,0 +1,41 @@
namespace AnthropicClient.Tests.Unit.Models;
public class MessageBatchDeleteResponseTests : SerializationTest
{
private const string SampleJson = @"{
""id"": ""test-id"",
""type"": ""test-type""
}";
[Fact]
public void Constructor_WhenCalled_ItShouldReturnAnInstanceWithPropertiesSet()
{
var result = new MessageBatchDeleteResponse();
result.Id.Should().BeEmpty();
result.Type.Should().BeEmpty();
}
[Fact]
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
{
var result = new MessageBatchDeleteResponse
{
Id = "test-id",
Type = "test-type"
};
var json = Serialize(result);
JsonAssert.Equal(SampleJson, json);
}
[Fact]
public void JsonDeserialization_WhenDeserialized_ItShouldHaveExpectedValues()
{
var result = Deserialize<MessageBatchDeleteResponse>(SampleJson);
result!.Id.Should().Be("test-id");
result.Type.Should().Be("test-type");
}
}