コード例 #1
0
        public void TestFail()
        {
            Action fail = () => ShouldAssertions.Fail();

            fail.Should().Throw <AssertionException>();
            Action pending = () => ShouldAssertions.LogPendingTest();

            pending.Should().Throw <IgnoreException>();
        }
コード例 #2
0
 private static void Fail(IEnumerable <Error> errors)
 {
     foreach (var error in errors)
     {
         if (error.Tag == ErrorType.HelpRequestedError ||
             error.Tag == ErrorType.VersionRequestedError)
         {
             continue;
         }
         ShouldAssertions.Fail(error.ToString());
     }
 }