Fix audit findings for coverage, architecture checks, and XML docs
This commit is contained in:
@@ -11,18 +11,27 @@ public class DbContextInheritanceTests : IDisposable
|
||||
private readonly string _dbPath;
|
||||
private readonly Shared.TestExtendedDbContext _db;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DbContextInheritanceTests"/> class.
|
||||
/// </summary>
|
||||
public DbContextInheritanceTests()
|
||||
{
|
||||
_dbPath = Path.Combine(Path.GetTempPath(), $"cbdd_inheritance_{Guid.NewGuid()}.db");
|
||||
_db = new Shared.TestExtendedDbContext(_dbPath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Releases test resources.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
_db.Dispose();
|
||||
if (File.Exists(_dbPath)) File.Delete(_dbPath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies parent collections are initialized in the extended context.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExtendedContext_Should_Initialize_Parent_Collections()
|
||||
{
|
||||
@@ -35,6 +44,9 @@ public class DbContextInheritanceTests : IDisposable
|
||||
_db.TestDocuments.ShouldNotBeNull();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies extended context collections are initialized.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExtendedContext_Should_Initialize_Own_Collections()
|
||||
{
|
||||
@@ -42,6 +54,9 @@ public class DbContextInheritanceTests : IDisposable
|
||||
_db.ExtendedEntities.ShouldNotBeNull();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies parent collections are usable from the extended context.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExtendedContext_Can_Use_Parent_Collections()
|
||||
{
|
||||
@@ -57,6 +72,9 @@ public class DbContextInheritanceTests : IDisposable
|
||||
retrieved.Age.ShouldBe(30);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies extended collections are usable from the extended context.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExtendedContext_Can_Use_Own_Collections()
|
||||
{
|
||||
@@ -76,6 +94,9 @@ public class DbContextInheritanceTests : IDisposable
|
||||
retrieved.Description.ShouldBe("Test Extended Entity");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies parent and extended collections can be used together.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void ExtendedContext_Can_Use_Both_Parent_And_Own_Collections()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user