Maybe I'm holding it wrong, but I feel I've found a bug.
I've added a failing unit test like this:
[Test]
public async Task TrueIfWithFollowingElseIfWithContextResultsInCorrectCounts()
{
// Given
CountModule a = new CountModule("A")
{
AdditionalOutputs = 2,
EnsureInputDocument = true
};
CountModule b = new CountModule("B")
{
AdditionalOutputs = 2
};
CountModule c = new CountModule("C")
{
AdditionalOutputs = 3
};
// When
await ExecuteAsync(
a,
new ExecuteIf(Config.FromContext(_ => true), b)
.ElseIf(Config.FromContext(_ => true), c));
// Then
a.ExecuteCount.ShouldBe(1);
b.ExecuteCount.ShouldBe(1);
c.ExecuteCount.ShouldBe(0);
}
Maybe I'm holding it wrong, but I feel I've found a bug.
I've added a failing unit test like this: