feat(#13): S-12b — Workflow Client user-tasks + Beoordelen userTask #83
@@ -128,6 +128,17 @@ public class FlowableWorkflowClientTests
|
|||||||
() => client.StartRegistrationProcessAsync(RegistrationId.New()));
|
() => 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<InvalidOperationException>(
|
||||||
|
() => client.StartRegistrationProcessAsync(RegistrationId.New()));
|
||||||
|
Assert.Contains("empty process-instance", ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task Complete_throws_when_flowable_rejects_the_request()
|
public async Task Complete_throws_when_flowable_rejects_the_request()
|
||||||
{
|
{
|
||||||
@@ -227,6 +238,7 @@ public class FlowableWorkflowClientTests
|
|||||||
capture.Seen.RequestUri!.ToString());
|
capture.Seen.RequestUri!.ToString());
|
||||||
Assert.Contains("\"action\":\"complete\"", capture.Body);
|
Assert.Contains("\"action\":\"complete\"", capture.Body);
|
||||||
Assert.Contains("\"name\":\"besluit\"", capture.Body);
|
Assert.Contains("\"name\":\"besluit\"", capture.Body);
|
||||||
|
Assert.Contains("\"type\":\"string\"", capture.Body);
|
||||||
Assert.Contains($"\"value\":\"{expected}\"", capture.Body);
|
Assert.Contains($"\"value\":\"{expected}\"", capture.Body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user