Exemplo n.º 1
0
    //-------------------------------------------------------------------------
    private static void SetOutcome(JUnitTestSuite jUnitTestSuite, TrxResultSummary trxResultSummary)
    {
        TrxOutcome outcome = GetOutcome(jUnitTestSuite);

        if (outcome != TrxOutcome.Passed)
        {
            trxResultSummary.Outcome = outcome;
        }
    }
Exemplo n.º 2
0
        //---------------------------------------------------------------------
        private static IEnumerable <TestCaseData> Value_given___correct_outcome_parsed_TestCases()
        {
            foreach (string value in Enum.GetNames(typeof(TrxOutcome)))
            {
                TrxOutcome expected = Enum.Parse <TrxOutcome>(value);
                yield return(new TestCaseData(value, true).Returns(expected));

                yield return(new TestCaseData(value, false).Returns(expected));
            }
        }
Exemplo n.º 3
0
        public void All_tests_passed___Passed()
        {
            var jUnitTestSuite = new JUnitTestSuite
            {
                TestCount    = 5,
                ErrorCount   = 0,
                FailureCount = 0,
                SkippedCount = 0
            };

            TrxOutcome actual = JUnit2TrxTestConverter.GetOutcome(jUnitTestSuite);

            Assert.AreEqual(TrxOutcome.Passed, actual);
        }
Exemplo n.º 4
0
        public void Tests_contain_skipped___NotExecuted()
        {
            var jUnitTestSuite = new JUnitTestSuite
            {
                TestCount    = 5,
                ErrorCount   = 0,
                FailureCount = 0,
                SkippedCount = 1
            };

            TrxOutcome actual = JUnit2TrxTestConverter.GetOutcome(jUnitTestSuite);

            Assert.AreEqual(TrxOutcome.NotExecuted, actual);
        }