feat: complete legacy UI and playout parity migration

This commit is contained in:
2026-07-15 13:11:38 +09:00
parent f14800656b
commit 6e0c275fdd
108 changed files with 43738 additions and 560 deletions

View File

@@ -0,0 +1,33 @@
#nullable enable
using MBN_STOCK_WEBVIEW.DbWriteSmoke;
namespace MBN_STOCK_WEBVIEW.DbWriteSmoke.Tests;
public sealed class SmokeRunIdentityTests
{
[Fact]
public void Create_ProducesCollisionResistantSafeBoundedPrefix()
{
var identity = SmokeRunIdentity.Create(
DateTimeOffset.Parse("2026-07-15T10:11:12+09:00"),
Guid.Parse("01234567-89ab-cdef-0123-456789abcdef"));
var value = identity.For("G_PROFIT");
Assert.Equal(
"MBW2607150123456789O",
value);
Assert.Equal(20, value.Length);
Assert.Matches("^[A-Z0-9]+$", value);
}
[Fact]
public void Create_RejectsEmptyNonceAndUnsafeSuffix()
{
Assert.Throws<ArgumentException>(() =>
SmokeRunIdentity.Create(DateTimeOffset.UtcNow, Guid.Empty));
var identity = SmokeRunIdentity.Create(DateTimeOffset.UtcNow, Guid.NewGuid());
Assert.Throws<ArgumentException>(() => identity.For("bad-value"));
}
}