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,12 +1,11 @@
using ZB.MOM.WW.CBDD.Bson;
using Xunit;
namespace ZB.MOM.WW.CBDD.Tests;
public class ObjectIdTests
{
/// <summary>
/// Verifies new object identifiers are 12 bytes long.
/// Verifies new object identifiers are 12 bytes long.
/// </summary>
[Fact]
public void NewObjectId_ShouldCreate12ByteId()
@@ -20,7 +19,7 @@ public class ObjectIdTests
}
/// <summary>
/// Verifies object identifiers round-trip from their binary form.
/// Verifies object identifiers round-trip from their binary form.
/// </summary>
[Fact]
public void ObjectId_ShouldRoundTrip()
@@ -36,7 +35,7 @@ public class ObjectIdTests
}
/// <summary>
/// Verifies object identifier equality behavior.
/// Verifies object identifier equality behavior.
/// </summary>
[Fact]
public void ObjectId_Equals_ShouldWork()
@@ -50,7 +49,7 @@ public class ObjectIdTests
}
/// <summary>
/// Verifies object identifier timestamps are recent UTC values.
/// Verifies object identifier timestamps are recent UTC values.
/// </summary>
[Fact]
public void ObjectId_Timestamp_ShouldBeRecentUtc()
@@ -61,4 +60,4 @@ public class ObjectIdTests
(timestamp <= DateTime.UtcNow).ShouldBeTrue();
(timestamp >= DateTime.UtcNow.AddSeconds(-5)).ShouldBeTrue();
}
}
}

View File

@@ -1,28 +1,32 @@
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 Xunit;
namespace ZB.MOM.WW.CBDD.Tests;
public class ValueObjectIdTests : IDisposable
{
private readonly TestDbContext _db;
private readonly string _dbPath = "value_object_ids.db";
private readonly Shared.TestDbContext _db;
/// <summary>
/// Initializes a new instance of the <see cref="ValueObjectIdTests"/> class.
/// Initializes a new instance of the <see cref="ValueObjectIdTests" /> class.
/// </summary>
public ValueObjectIdTests()
{
if (File.Exists(_dbPath)) File.Delete(_dbPath);
_db = new Shared.TestDbContext(_dbPath);
_db = new TestDbContext(_dbPath);
}
/// <summary>
/// Executes Should_Support_ValueObject_Id_Conversion.
/// Executes Dispose.
/// </summary>
public void Dispose()
{
_db.Dispose();
if (File.Exists(_dbPath)) File.Delete(_dbPath);
}
/// <summary>
/// Executes Should_Support_ValueObject_Id_Conversion.
/// </summary>
[Fact]
public void Should_Support_ValueObject_Id_Conversion()
@@ -41,13 +45,4 @@ public class ValueObjectIdTests : IDisposable
retrieved.Id.Value.ShouldBe("ORD-123");
retrieved.CustomerName.ShouldBe("John Doe");
}
/// <summary>
/// Executes Dispose.
/// </summary>
public void Dispose()
{
_db.Dispose();
if (File.Exists(_dbPath)) File.Delete(_dbPath);
}
}
}