_TestCleanupFailure AdaptTestCleanupFailure(ITestCleanupFailure message)
        {
            var testCollectionUniqueID = UniqueIDForTestCollection(assemblyUniqueID, message.TestCollection);
            var testClassUniqueID      = UniqueIDForTestClass(testCollectionUniqueID, message.TestClass);
            var testMethodUniqueID     = UniqueIDForTestMethod(testClassUniqueID, message.TestMethod);
            var testCaseUniqueID       = message.TestCase.UniqueID;
            var testUniqueID           = UniqueIDForTest(testCaseUniqueID, message.Test);

            return(new _TestCleanupFailure
            {
                AssemblyUniqueID = assemblyUniqueID,
                ExceptionParentIndices = message.ExceptionParentIndices,
                ExceptionTypes = message.ExceptionTypes,
                Messages = message.Messages,
                StackTraces = message.StackTraces,
                TestCaseUniqueID = testCaseUniqueID,
                TestCollectionUniqueID = testCollectionUniqueID,
                TestClassUniqueID = testClassUniqueID,
                TestMethodUniqueID = testMethodUniqueID,
                TestUniqueID = testUniqueID
            });
        }
        protected override bool Visit(ITestCleanupFailure cleanupFailure)
        {
            logger.LogImportantMessage(cleanupFailure.ToJson());

            return base.Visit(cleanupFailure);
        }
Esempio n. 3
0
        public static string ToJson(this ITestCleanupFailure testCleanupFailure)
        {
            var json = initObject("testCleanupFailure", testCleanupFailure, typeof(ITestCleanupFailure));

            return(ToJson(json));
        }
Esempio n. 4
0
        protected override bool Visit(ITestCleanupFailure cleanupFailure)
        {
            AddError("test-cleanup", cleanupFailure.Test.DisplayName, cleanupFailure);

            return(base.Visit(cleanupFailure));
        }
Esempio n. 5
0
        protected override bool Visit(ITestCleanupFailure cleanupFailure)
        {
            ReportError(String.Format("Test Cleanup Failure ({0})", cleanupFailure.TestDisplayName), cleanupFailure);

            return(base.Visit(cleanupFailure));
        }
        /// <inheritdoc/>
        protected override bool Visit(ITestCleanupFailure cleanupFailure)
        {
            LogError($"Test Cleanup Failure ({cleanupFailure.Test.DisplayName})", cleanupFailure);

            return(base.Visit(cleanupFailure));
        }
Esempio n. 7
0
 protected override bool Visit(ITestCleanupFailure cleanupFailure)
 {
     return(WriteError(String.Format("Test Cleanup Failure ({0})", cleanupFailure.Test.DisplayName), cleanupFailure, cleanupFailure.TestCases));
 }
Esempio n. 8
0
        protected override bool Visit(ITestCleanupFailure cleanupFailure)
        {
            WriteError(string.Format("Test Cleanup Failure ({0})", cleanupFailure.Test.DisplayName), cleanupFailure);

            return base.Visit(cleanupFailure);
        }
Esempio n. 9
0
 /// <summary>
 /// Called when an instance of <see cref="ITestCleanupFailure"/> is sent to the message sink.
 /// </summary>
 /// <param name="cleanupFailure">The message.</param>
 /// <returns>Return <c>true</c> to continue executing tests; <c>false</c> otherwise.</returns>
 protected virtual bool Visit(ITestCleanupFailure cleanupFailure)
 {
     return(true);
 }
        /// <inheritdoc/>
        protected override bool Visit(ITestCleanupFailure cleanupFailure)
        {
            LogError($"Test Cleanup Failure ({cleanupFailure.Test.DisplayName})", cleanupFailure);

            return base.Visit(cleanupFailure);
        }
 protected override bool Visit(ITestCleanupFailure testCleanupFailure)
 {
     // TODO: What causes this to be called? Not captured in existing tests
     // BeforeAfterAttribute?
     return(context.ShouldContinue);
 }
Esempio n. 12
0
        protected override bool Visit(ITestCleanupFailure cleanupFailure)
        {
            logger.LogImportantMessage(cleanupFailure.ToJson());

            return(base.Visit(cleanupFailure));
        }
        protected override bool Visit(ITestCleanupFailure cleanupFailure)
        {
            ExecutionSummary.Errors++;

            return(WriteError($"Test Cleanup Failure ({cleanupFailure.Test.DisplayName})", cleanupFailure, cleanupFailure.TestCases));
        }