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