Fix audit findings for coverage, architecture checks, and XML docs
All checks were successful
NuGet Publish / build-and-pack (push) Successful in 45s
NuGet Publish / publish-to-gitea (push) Successful in 52s

This commit is contained in:
Joseph Doherty
2026-02-20 15:43:25 -05:00
parent 5528806518
commit 3ffd468c79
99 changed files with 23746 additions and 9548 deletions

View File

@@ -8,12 +8,18 @@ public class DocumentCollectionIndexApiTests : IDisposable
private readonly string _dbPath;
private readonly Shared.TestDbContext _db;
/// <summary>
/// Initializes a new instance of the <see cref="DocumentCollectionIndexApiTests"/> class.
/// </summary>
public DocumentCollectionIndexApiTests()
{
_dbPath = Path.Combine(Path.GetTempPath(), $"collection_index_api_{Guid.NewGuid():N}.db");
_db = new Shared.TestDbContext(_dbPath);
}
/// <summary>
/// Verifies vector index creation and deletion behavior.
/// </summary>
[Fact]
public void CreateVectorIndex_And_DropIndex_Should_Work()
{
@@ -32,6 +38,9 @@ public class DocumentCollectionIndexApiTests : IDisposable
_db.VectorItems.GetIndexes().Select(x => x.Name).ShouldNotContain("idx_vector_extra");
}
/// <summary>
/// Verifies ensure-index returns existing indexes when already present.
/// </summary>
[Fact]
public void EnsureIndex_Should_Return_Existing_Index_When_Already_Present()
{
@@ -41,12 +50,18 @@ public class DocumentCollectionIndexApiTests : IDisposable
ReferenceEquals(first, second).ShouldBeTrue();
}
/// <summary>
/// Verifies dropping the primary index name is rejected.
/// </summary>
[Fact]
public void DropIndex_Should_Reject_Primary_Index_Name()
{
Should.Throw<InvalidOperationException>(() => _db.People.DropIndex("_id"));
}
/// <summary>
/// Disposes test resources and removes temporary files.
/// </summary>
public void Dispose()
{
_db.Dispose();