Reformat / cleanup
All checks were successful
NuGet Publish / build-and-pack (push) Successful in 46s
NuGet Publish / publish-to-gitea (push) Successful in 56s

This commit is contained in:
Joseph Doherty
2026-02-21 08:10:36 -05:00
parent 4c6aaa5a3f
commit a70d8befae
176 changed files with 50555 additions and 49587 deletions

View File

@@ -1,27 +1,23 @@
using System;
using System.IO;
using ZB.MOM.WW.CBDD.Bson;
using ZB.MOM.WW.CBDD.Shared;
using Xunit;
namespace ZB.MOM.WW.CBDD.Tests;
public class DbContextInheritanceTests : IDisposable
{
private readonly TestExtendedDbContext _db;
private readonly string _dbPath;
private readonly Shared.TestExtendedDbContext _db;
/// <summary>
/// Initializes a new instance of the <see cref="DbContextInheritanceTests"/> class.
/// 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);
_db = new TestExtendedDbContext(_dbPath);
}
/// <summary>
/// Releases test resources.
/// Releases test resources.
/// </summary>
public void Dispose()
{
@@ -30,7 +26,7 @@ public class DbContextInheritanceTests : IDisposable
}
/// <summary>
/// Verifies parent collections are initialized in the extended context.
/// Verifies parent collections are initialized in the extended context.
/// </summary>
[Fact]
public void ExtendedContext_Should_Initialize_Parent_Collections()
@@ -45,7 +41,7 @@ public class DbContextInheritanceTests : IDisposable
}
/// <summary>
/// Verifies extended context collections are initialized.
/// Verifies extended context collections are initialized.
/// </summary>
[Fact]
public void ExtendedContext_Should_Initialize_Own_Collections()
@@ -55,7 +51,7 @@ public class DbContextInheritanceTests : IDisposable
}
/// <summary>
/// Verifies parent collections are usable from the extended context.
/// Verifies parent collections are usable from the extended context.
/// </summary>
[Fact]
public void ExtendedContext_Can_Use_Parent_Collections()
@@ -73,7 +69,7 @@ public class DbContextInheritanceTests : IDisposable
}
/// <summary>
/// Verifies extended collections are usable from the extended context.
/// Verifies extended collections are usable from the extended context.
/// </summary>
[Fact]
public void ExtendedContext_Can_Use_Own_Collections()
@@ -95,7 +91,7 @@ public class DbContextInheritanceTests : IDisposable
}
/// <summary>
/// Verifies parent and extended collections can be used together.
/// Verifies parent and extended collections can be used together.
/// </summary>
[Fact]
public void ExtendedContext_Can_Use_Both_Parent_And_Own_Collections()
@@ -125,4 +121,4 @@ public class DbContextInheritanceTests : IDisposable
retrievedExtended.ShouldNotBeNull();
retrievedExtended.Description.ShouldBe("Related to John");
}
}
}