tests: don't reuse http client as fixture

This commit is contained in:
Stevan Freeborn
2024-06-29 09:49:15 -05:00
parent ffee24d8ec
commit 6caa4b1b06
3 changed files with 9 additions and 15 deletions
@@ -6,25 +6,25 @@ public class AnthropicResultTests
public void Success_WhenCalled_ItShouldReturnSuccessResult()
{
var value = "success";
var requestId = Guid.NewGuid().ToString();
var headers = new AnthropicHeaders();
var actual = AnthropicResult<string>.Success(value, requestId);
var actual = AnthropicResult<string>.Success(value, headers);
actual.IsSuccess.Should().BeTrue();
actual.Value.Should().Be(value);
actual.RequestId.Should().Be(requestId);
actual.Headers.Should().Be(headers);
}
[Fact]
public void Failure_WhenCalled_ItShouldReturnFailureResult()
{
var error = new AnthropicError(new AuthenticationError("message"));
var requestId = Guid.NewGuid().ToString();
var headers = new AnthropicHeaders();
var actual = AnthropicResult<string>.Failure(error, requestId);
var actual = AnthropicResult<string>.Failure(error, headers);
actual.IsSuccess.Should().BeFalse();
actual.Error.Should().Be(error);
actual.RequestId.Should().Be(requestId);
actual.Headers.Should().Be(headers);
}
}