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,6 +8,9 @@ namespace ZB.MOM.WW.CBDD.Tests;
public class BsonDocumentAndBufferWriterTests
{
/// <summary>
/// Verifies BSON document creation and typed retrieval roundtrip.
/// </summary>
[Fact]
public void BsonDocument_Create_And_TryGet_RoundTrip()
{
@@ -42,6 +45,9 @@ public class BsonDocumentAndBufferWriterTests
reader.ReadDocumentSize().ShouldBeGreaterThan(0);
}
/// <summary>
/// Verifies typed getters return false for missing fields and type mismatches.
/// </summary>
[Fact]
public void BsonDocument_TryGet_Should_Return_False_For_Missing_Or_Wrong_Type()
{
@@ -64,6 +70,9 @@ public class BsonDocumentAndBufferWriterTests
wrapped.TryGetObjectId("age", out _).ShouldBeFalse();
}
/// <summary>
/// Verifies the BSON document builder grows its internal buffer for large documents.
/// </summary>
[Fact]
public void BsonDocumentBuilder_Should_Grow_Buffer_When_Document_Is_Large()
{
@@ -90,6 +99,9 @@ public class BsonDocumentAndBufferWriterTests
value.ShouldBe(180);
}
/// <summary>
/// Verifies BSON buffer writer emits expected nested document and array layout.
/// </summary>
[Fact]
public void BsonBufferWriter_Should_Write_Nested_Document_And_Array()
{
@@ -151,6 +163,9 @@ public class BsonDocumentAndBufferWriterTests
reader.ReadBsonType().ShouldBe(BsonType.EndOfDocument);
}
/// <summary>
/// Verifies single-byte and C-string span reads operate correctly.
/// </summary>
[Fact]
public void BsonSpanReader_ReadByte_And_ReadCStringSpan_Should_Work()
{