Files
KArtSell.Aegis/tests/KArtSell.ModelOperations.UnitTests/DapperModelScheduleRepositoryContractTests.cs
kjh2064 5a1570790c feat: fence scheduler next-due updates (AEG-V15-036)
Adds dispatch revision CAS to dispatched, skip, and release schedule mutations. Targeted Release evidence: 8/8 passed. PostgreSQL concurrency rehearsal remains required; WBS stays IN_PROGRESS.
2026-08-09 02:06:37 +09:00

23 lines
815 B
C#

using System.Reflection;
using KArtSell.Modules.ModelOperations.Infrastructure;
namespace KArtSell.ModelOperations.UnitTests;
public sealed class DapperModelScheduleRepositoryContractTests
{
[Theory]
[InlineData("DispatchedSql")]
[InlineData("AdvanceSql")]
[InlineData("ReleaseSql")]
public void Every_next_due_mutation_requires_the_acquired_dispatch_revision(string fieldName)
{
var sql = (string?)typeof(DapperModelScheduleRepository)
.GetField(fieldName, BindingFlags.NonPublic | BindingFlags.Static)
?.GetRawConstantValue();
Assert.NotNull(sql);
Assert.Contains("dispatch_revision = @ExpectedDispatchRevision", sql, StringComparison.Ordinal);
Assert.Contains("lease_owner = @LeaseOwner", sql, StringComparison.Ordinal);
}
}