Files
KArtSell.Aegis/tests/KArtSell.ModelOperations.UnitTests/ModelOperationExecutionTests.cs
T
kjh2064 dcd1322d41
ci / backend (push) Failing after 12s
ci / frontend (push) Failing after 19s
ci / static (push) Failing after 45s
Initial commit: Add project files
2026-08-02 05:15:36 +09:00

15 lines
814 B
C#

using KArtSell.Modules.ModelOperations.Domain;
namespace KArtSell.ModelOperations.UnitTests;
public sealed class ModelOperationExecutionTests
{
[Fact] public void Business_hold_can_resume_but_success_is_terminal()
{
var now = DateTimeOffset.UtcNow;
var execution = new ModelOperationExecution(Guid.NewGuid(), "J32:KR:1", now);
execution.MoveTo(ModelOperationExecutionState.BusinessHold, "PIT_NOT_READY", "h1", now);
execution.MoveTo(ModelOperationExecutionState.Running, "DATA_READY", "h2", now.AddMinutes(1));
execution.MoveTo(ModelOperationExecutionState.Succeeded, "OUTPUT_FROZEN", "h3", now.AddMinutes(2));
Assert.Throws<InvalidOperationException>(() => execution.MoveTo(ModelOperationExecutionState.Running, "REOPEN", "h4", now.AddMinutes(3)));
}
}