5a1570790c
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.
23 lines
815 B
C#
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);
|
|
}
|
|
}
|