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,10 +1,4 @@
using ZB.MOM.WW.CBDD.Bson;
using ZB.MOM.WW.CBDD.Core;
using ZB.MOM.WW.CBDD.Core.Collections;
using ZB.MOM.WW.CBDD.Core.Metadata;
using ZB.MOM.WW.CBDD.Shared;
using System;
using System.Buffers;
namespace ZB.MOM.WW.CBDD.Tests;
@@ -13,7 +7,7 @@ public class PrimaryKeyTests : IDisposable
private readonly string _dbPath = "primary_key_tests.db";
/// <summary>
/// Initializes a new instance of the <see cref="PrimaryKeyTests"/> class.
/// Initializes a new instance of the <see cref="PrimaryKeyTests" /> class.
/// </summary>
public PrimaryKeyTests()
{
@@ -21,7 +15,7 @@ public class PrimaryKeyTests : IDisposable
}
/// <summary>
/// Executes Dispose.
/// Executes Dispose.
/// </summary>
public void Dispose()
{
@@ -29,12 +23,12 @@ public class PrimaryKeyTests : IDisposable
}
/// <summary>
/// Executes Test_Int_PrimaryKey.
/// Executes Test_Int_PrimaryKey.
/// </summary>
[Fact]
public void Test_Int_PrimaryKey()
{
using var db = new Shared.TestDbContext(_dbPath);
using var db = new TestDbContext(_dbPath);
var entity = new IntEntity { Id = 1, Name = "Test 1" };
db.IntEntities.Insert(entity);
@@ -56,12 +50,12 @@ public class PrimaryKeyTests : IDisposable
}
/// <summary>
/// Executes Test_String_PrimaryKey.
/// Executes Test_String_PrimaryKey.
/// </summary>
[Fact]
public void Test_String_PrimaryKey()
{
using var db = new Shared.TestDbContext(_dbPath);
using var db = new TestDbContext(_dbPath);
var entity = new StringEntity { Id = "key1", Value = "Value 1" };
db.StringEntities.Insert(entity);
@@ -78,12 +72,12 @@ public class PrimaryKeyTests : IDisposable
}
/// <summary>
/// Executes Test_Guid_PrimaryKey.
/// Executes Test_Guid_PrimaryKey.
/// </summary>
[Fact]
public void Test_Guid_PrimaryKey()
{
using var db = new Shared.TestDbContext(_dbPath);
using var db = new TestDbContext(_dbPath);
var id = Guid.NewGuid();
var entity = new GuidEntity { Id = id, Name = "Guid Test" };
@@ -100,13 +94,13 @@ public class PrimaryKeyTests : IDisposable
}
/// <summary>
/// Executes Test_String_PrimaryKey_With_Custom_Name.
/// Executes Test_String_PrimaryKey_With_Custom_Name.
/// </summary>
[Fact]
public void Test_String_PrimaryKey_With_Custom_Name()
{
// Test entity with string key NOT named "Id" (named "Code" instead)
using var db = new Shared.TestDbContext(_dbPath);
using var db = new TestDbContext(_dbPath);
var entity = new CustomKeyEntity { Code = "ABC123", Description = "Test Description" };
db.CustomKeyEntities.Insert(entity);
@@ -131,4 +125,4 @@ public class PrimaryKeyTests : IDisposable
db.SaveChanges();
db.CustomKeyEntities.FindById("ABC123").ShouldBeNull();
}
}
}