/// <inheritdoc /> public void Act() { if (invocationOutcome != null) { throw new InvalidOperationException("Test action already invoked"); } try { invocationOutcome = new TestFunctionOutcome <TResult>(act()); } catch (Exception e) { invocationOutcome = new TestFunctionOutcome <TResult>(e); } }
internal void Invoke(TestFunctionOutcome <TResult> outcome) { outcome.ThrowIfException(); assert?.Invoke(outcome.Result); }
internal void Invoke(TestFunctionOutcome <TResult> outcome) => assert(outcome);