feat: add unit tests for DocumentContent, CustomSource, PageLocationCitation, SourceType, and TextSource classes
chore: update VSCode settings to exclude docs from search
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
namespace AnthropicClient.Tests.Unit.Models;
|
||||
|
||||
public class CustomSourceTests
|
||||
{
|
||||
[Fact]
|
||||
public void Constructor_WhenCalled_ItShouldSetProperties()
|
||||
{
|
||||
var result = new CustomSource();
|
||||
|
||||
result.Content.Should().BeEmpty();
|
||||
result.Type.Should().Be("content");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Constructor_WhenCalledWithContent_ItShouldSetProperties()
|
||||
{
|
||||
var content = new List<TextContent>
|
||||
{
|
||||
new("Sample text")
|
||||
};
|
||||
|
||||
var result = new CustomSource(content);
|
||||
|
||||
result.Content.Should().BeSameAs(content);
|
||||
result.Type.Should().Be("content");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Constructor_WhenCalledWithNullContent_ItShouldThrowArgumentNullException()
|
||||
{
|
||||
var act = () => new CustomSource(null!);
|
||||
|
||||
act.Should().Throw<ArgumentNullException>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user