From 57b8755f9d980f71b8188b1acc59eea7c7560cf5 Mon Sep 17 00:00:00 2001 From: Niek Otten Date: Wed, 15 Jul 2026 09:24:53 +0200 Subject: [PATCH] test(workflow): cover the besluit variable type + start empty-body throw (refs #13) Kills two mutation survivors: assert the complete besluit variable's type, and add the missing start empty-response case (the pre-existing baseline survivor). Domain mutation score reaches 100%. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../domain/Big.Tests/FlowableWorkflowClientTests.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/services/domain/Big.Tests/FlowableWorkflowClientTests.cs b/services/domain/Big.Tests/FlowableWorkflowClientTests.cs index 3d53a04..b36b13e 100644 --- a/services/domain/Big.Tests/FlowableWorkflowClientTests.cs +++ b/services/domain/Big.Tests/FlowableWorkflowClientTests.cs @@ -128,6 +128,17 @@ public class FlowableWorkflowClientTests () => client.StartRegistrationProcessAsync(RegistrationId.New())); } + [Fact] + public async Task Start_throws_when_flowable_returns_an_empty_body() + { + var capture = new RequestCapture(); + var client = Client(capture.Responds(HttpStatusCode.Created, "null")); + + var ex = await Assert.ThrowsAsync( + () => client.StartRegistrationProcessAsync(RegistrationId.New())); + Assert.Contains("empty process-instance", ex.Message); + } + [Fact] public async Task Complete_throws_when_flowable_rejects_the_request() { @@ -227,6 +238,7 @@ public class FlowableWorkflowClientTests capture.Seen.RequestUri!.ToString()); Assert.Contains("\"action\":\"complete\"", capture.Body); Assert.Contains("\"name\":\"besluit\"", capture.Body); + Assert.Contains("\"type\":\"string\"", capture.Body); Assert.Contains($"\"value\":\"{expected}\"", capture.Body); }