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

@@ -16,6 +16,9 @@ namespace ZB.MOM.WW.CBDD.Tests
private readonly string _dbPath;
private readonly Shared.TestDbContext _db;
/// <summary>
/// Initializes test database state used by advanced query tests.
/// </summary>
public AdvancedQueryTests()
{
_dbPath = Path.Combine(Path.GetTempPath(), $"cbdd_advanced_{Guid.NewGuid()}.db");
@@ -30,12 +33,18 @@ namespace ZB.MOM.WW.CBDD.Tests
_db.SaveChanges();
}
/// <summary>
/// Disposes test resources and removes temporary files.
/// </summary>
public void Dispose()
{
_db.Dispose();
if (File.Exists(_dbPath)) File.Delete(_dbPath);
}
/// <summary>
/// Verifies grouping by a simple key returns expected groups and counts.
/// </summary>
[Fact]
public void GroupBy_Simple_Key_Works()
{
@@ -57,6 +66,9 @@ namespace ZB.MOM.WW.CBDD.Tests
groupC.Count().ShouldBe(1);
}
/// <summary>
/// Verifies grouped projection with aggregation returns expected totals.
/// </summary>
[Fact]
public void GroupBy_With_Aggregation_Select()
{
@@ -77,6 +89,9 @@ namespace ZB.MOM.WW.CBDD.Tests
results[2].Total.ShouldBe(50); // 50
}
/// <summary>
/// Verifies direct aggregate operators return expected values.
/// </summary>
[Fact]
public void Aggregations_Direct_Works()
{
@@ -89,6 +104,9 @@ namespace ZB.MOM.WW.CBDD.Tests
query.Max(x => x.Amount).ShouldBe(50);
}
/// <summary>
/// Verifies aggregate operators with predicates return expected values.
/// </summary>
[Fact]
public void Aggregations_With_Predicate_Works()
{
@@ -98,6 +116,9 @@ namespace ZB.MOM.WW.CBDD.Tests
query.Sum(x => x.Amount).ShouldBe(30);
}
/// <summary>
/// Verifies in-memory join query execution returns expected rows.
/// </summary>
[Fact]
public void Join_Works_InMemory()
{
@@ -126,6 +147,9 @@ namespace ZB.MOM.WW.CBDD.Tests
}
/// <summary>
/// Verifies projection of nested object properties works.
/// </summary>
[Fact]
public void Select_Project_Nested_Object()
{
@@ -152,6 +176,9 @@ namespace ZB.MOM.WW.CBDD.Tests
query[0].Street.ShouldBe("5th Ave");
}
/// <summary>
/// Verifies projection of nested scalar fields works.
/// </summary>
[Fact]
public void Select_Project_Nested_Field()
{
@@ -172,6 +199,9 @@ namespace ZB.MOM.WW.CBDD.Tests
cities[0].ShouldBe("New York");
}
/// <summary>
/// Verifies anonymous projection including nested values works.
/// </summary>
[Fact]
public void Select_Anonymous_Complex()
{
@@ -196,6 +226,9 @@ namespace ZB.MOM.WW.CBDD.Tests
result[0].City.Name.ShouldBe("New York");
}
/// <summary>
/// Verifies projection and retrieval of nested arrays of objects works.
/// </summary>
[Fact]
public void Select_Project_Nested_Array_Of_Objects()
{