Fix audit findings for coverage, architecture checks, and XML docs
This commit is contained in:
@@ -20,12 +20,18 @@ public class CircularReferenceTests : IDisposable
|
||||
private readonly string _dbPath;
|
||||
private readonly Shared.TestDbContext _context;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CircularReferenceTests"/> class.
|
||||
/// </summary>
|
||||
public CircularReferenceTests()
|
||||
{
|
||||
_dbPath = Path.Combine(Path.GetTempPath(), $"cbdd_circular_test_{Guid.NewGuid()}");
|
||||
_context = new Shared.TestDbContext(_dbPath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes Dispose.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
_context?.Dispose();
|
||||
@@ -39,6 +45,9 @@ public class CircularReferenceTests : IDisposable
|
||||
// Self-Reference Tests (Employee hierarchy with ObjectId references)
|
||||
// ========================================
|
||||
|
||||
/// <summary>
|
||||
/// Executes SelfReference_InsertAndQuery_ShouldWork.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void SelfReference_InsertAndQuery_ShouldWork()
|
||||
{
|
||||
@@ -115,6 +124,9 @@ public class CircularReferenceTests : IDisposable
|
||||
(queriedDeveloper.DirectReportIds ?? new List<ObjectId>()).ShouldBeEmpty();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes SelfReference_UpdateDirectReports_ShouldPersist.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void SelfReference_UpdateDirectReports_ShouldPersist()
|
||||
{
|
||||
@@ -164,6 +176,9 @@ public class CircularReferenceTests : IDisposable
|
||||
queried.DirectReportIds.ShouldContain(employee2Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes SelfReference_QueryByManagerId_ShouldWork.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void SelfReference_QueryByManagerId_ShouldWork()
|
||||
{
|
||||
@@ -214,6 +229,9 @@ public class CircularReferenceTests : IDisposable
|
||||
// BEST PRACTICE for document databases
|
||||
// ========================================
|
||||
|
||||
/// <summary>
|
||||
/// Executes NtoNReferencing_InsertAndQuery_ShouldWork.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void NtoNReferencing_InsertAndQuery_ShouldWork()
|
||||
{
|
||||
@@ -279,6 +297,9 @@ public class CircularReferenceTests : IDisposable
|
||||
queriedProduct.CategoryIds.ShouldContain(categoryId2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes NtoNReferencing_UpdateRelationships_ShouldPersist.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void NtoNReferencing_UpdateRelationships_ShouldPersist()
|
||||
{
|
||||
@@ -336,6 +357,9 @@ public class CircularReferenceTests : IDisposable
|
||||
queriedProduct2.CategoryIds.ShouldContain(categoryId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes NtoNReferencing_DocumentSize_RemainSmall.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void NtoNReferencing_DocumentSize_RemainSmall()
|
||||
{
|
||||
@@ -365,6 +389,9 @@ public class CircularReferenceTests : IDisposable
|
||||
// This demonstrates why referencing is preferred for large N-N relationships
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes NtoNReferencing_QueryByProductId_ShouldWork.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void NtoNReferencing_QueryByProductId_ShouldWork()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user