コード例 #1
0
ファイル: ActionTest.cs プロジェクト: sdcondon/FlUnit
            /// <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);
                }
            }
コード例 #2
0
 internal void Invoke(TestActionOutcome outcome)
 {
     outcome.ThrowIfNoException();
     assert?.Invoke(outcome.Exception);
 }
コード例 #3
0
 internal void Invoke(TestActionOutcome outcome) => assert(outcome);