コード例 #1
0
        private TestResult BuildResult(
            TestResult result,
            TestConsoleAccess consoleAccess,
            PNUnitTestInfo testInfo)
        {
            //the test namespace contains errors
            if (result == null)
            {
                TestName testName = new TestName();
                testName.Name     = testInfo.TestName;

                string errormsg = "The test {0} couldn't be found in the assembly {1}";

                result = new PNUnitTestResult(testName, string.Empty);
                result.Failure(
                    string.Format(errormsg, testInfo.TestToRun, testInfo.AssemblyName),
                    string.Empty);

                return(result);
            }

            if (!result.IsSuccess /*|| ReturnTestOutput()*/)
            {
                return(new PNUnitTestResult(result, consoleAccess.GetTestOutput()));
            }
            else
            {
                return(result);
            }
        }
コード例 #2
0
 private TestResult BuildResult(TestResult result, TestConsoleAccess consoleAccess)
 {
     if (!result.IsSuccess)
     {
         return(new PNUnitTestResult(result, consoleAccess.GetTestOutput()));
     }
     else
     {
         return(result);
     }
 }
コード例 #3
0
        private TestResult BuildError(string message, TestConsoleAccess consoleAccess)
        {
            TestName testName = new TestName();

            testName.Name     = mPNUnitTestInfo.TestName;
            testName.FullName = mPNUnitTestInfo.TestName;
            testName.TestID   = new TestID();

            TestResult result = new PNUnitTestResult(testName, consoleAccess.GetTestOutput());

            result.Failure(message, string.Empty);
            return(result);
        }
コード例 #4
0
        private TestResult BuildError(Exception e, TestConsoleAccess consoleAccess)
        {
            TestName testName = new TestName();

            testName.Name     = mPNUnitTestInfo.TestName;
            testName.FullName = mPNUnitTestInfo.TestName;
            testName.TestID   = new TestID();

            TestResult result = new PNUnitTestResult(testName, consoleAccess.GetTestOutput());

            result.Error(e);
            return(result);
        }
コード例 #5
0
        private TestResult BuildError(Exception e, TestConsoleAccess consoleAccess)
        {
            TestName testName = new TestName();
            testName.Name = mPNUnitTestInfo.TestName;
            testName.FullName = mPNUnitTestInfo.TestName;
            testName.TestID = new TestID();

            TestResult result = new PNUnitTestResult(testName, consoleAccess.GetTestOutput());
            result.Error(e);
            return result;
        }
コード例 #6
0
 private TestResult BuildResult(TestResult result, TestConsoleAccess consoleAccess)
 {
     if (!result.IsSuccess)
     {
         return new PNUnitTestResult(result, consoleAccess.GetTestOutput());
     }
     else
         return result;
 }
コード例 #7
0
        private TestResult BuildError(string message, TestConsoleAccess consoleAccess)
        {
            TestName testName = new TestName();
            testName.Name = mPNUnitTestInfo.TestName;
            testName.FullName = mPNUnitTestInfo.TestName;
            testName.TestID = new TestID();

            TestResult result = new PNUnitTestResult(testName, consoleAccess.GetTestOutput());
            result.Failure(message, string.Empty);
            return result;
        }
コード例 #8
0
        private TestResult BuildResult(
            TestResult result,
            TestConsoleAccess consoleAccess,
            PNUnitTestInfo testInfo)
        {
            //the test namespace contains errors
            if( result == null )
            {
                TestName testName = new TestName();
                testName.Name = testInfo.TestName;

                string errormsg = "The test {0} couldn't be found in the assembly {1}";

                result = new PNUnitTestResult(testName, string.Empty);
                result.Failure(
                    string.Format(errormsg, testInfo.TestToRun, testInfo.AssemblyName),
                    string.Empty);

                return result;
            }

            if( !result.IsSuccess /*|| ReturnTestOutput()*/ )
                return new PNUnitTestResult(result, consoleAccess.GetTestOutput());
            else
                return result;
        }