tests: adding missing tests for newly introduced classes

This commit is contained in:
Stevan Freeborn
2025-06-15 11:49:48 -05:00
parent 98da1384c1
commit 0c62a7cfcc
12 changed files with 190 additions and 0 deletions
@@ -0,0 +1,31 @@
namespace AnthropicClient.Tests.Unit.Models;
public class CitationDeltaTests
{
[Fact]
public void Constructor_WhenCalled_ItShouldSetProperties()
{
var result = new CitationDelta();
result.Type.Should().Be("citations_delta");
result.Citation.Should().BeEquivalentTo(new CharacterLocationCitation());
}
[Fact]
public void Constructor_WhenCalledWithCitation_ItShouldSetProperties()
{
var citation = new ContentBlockLocationCitation();
var result = new CitationDelta(citation);
result.Type.Should().Be("citations_delta");
result.Citation.Should().BeSameAs(citation);
}
[Fact]
public void Constructor_WhenCalledWithNullCitation_ItShouldThrowException()
{
var act = () => new CitationDelta(null!);
act.Should().Throw<ArgumentNullException>();
}
}