Пример #1
0
            /// <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);
 }
Пример #3
0
 internal void Invoke(TestFunctionOutcome <TResult> outcome) => assert(outcome);