tests: add end-to-end test for creating a message batch

This commit is contained in:
Stevan Freeborn
2025-01-08 22:33:27 -06:00
parent 854e4642ab
commit 779a5ca281
@@ -341,4 +341,24 @@ public class ClientTests(ConfigurationFixture configFixture) : EndToEndTest(conf
result.Value.Should().BeOfType<AnthropicModel>();
result.Value.Id.Should().Be(AnthropicModels.Claude3Haiku);
}
[Fact]
public async Task CreateMessageBatchAsync_WhenCalled_ItShouldReturnResponse()
{
var request = new MessageBatchRequest([
new(
Guid.NewGuid().ToString(),
new(
model: AnthropicModels.Claude3Haiku,
messages: [new(MessageRole.User, [new TextContent("Hello!")])]
)
),
]);
var result = await _client.CreateMessageBatchAsync(request);
result.IsSuccess.Should().BeTrue();
result.Value.Should().BeOfType<MessageBatchResponse>();
result.Value.Id.Should().NotBeNullOrEmpty();
}
}