← Back to team overview

nunit-core team mailing list archive

[Merge] lp:~jterrell/nunitv2/action-attributes into lp:nunitv2

 

Jordan Terrell has proposed merging lp:~jterrell/nunitv2/action-attributes into lp:nunitv2.

Requested reviews:
  NUnit Core Developers (nunit-core)

For more details, see:
https://code.launchpad.net/~jterrell/nunitv2/action-attributes/+merge/51670

Contains FailureSite enum changes and a fix for Bug #726313.
-- 
https://code.launchpad.net/~jterrell/nunitv2/action-attributes/+merge/51670
Your team NUnit Core Developers is requested to review the proposed merge of lp:~jterrell/nunitv2/action-attributes into lp:nunitv2.
=== modified file 'src/NUnitCore/core/TestSuite.cs'
--- src/NUnitCore/core/TestSuite.cs	2011-02-28 03:09:49 +0000
+++ src/NUnitCore/core/TestSuite.cs	2011-03-01 00:57:15 +0000
@@ -584,7 +584,10 @@
             {
                 listener.SuiteStarted(test.TestName);
                 TestResult result = new TestResult( new TestInfo(test) );
-				string msg = string.Format( "Parent SetUp failed in {0}", this.FixtureType.Name );
+				string msg = this.FixtureType == null
+                    ? "Parent SetUp failed"
+                    : string.Format( "Parent SetUp failed in {0}", this.FixtureType.Name );
+
 				result.Failure(msg, null, FailureSite.Parent);
                 MarkTestsFailed(test.Tests, suiteResult, listener, filter);
                 suiteResult.AddResult(result);
@@ -594,7 +597,9 @@
             {
                 listener.TestStarted(test.TestName);
                 TestResult result = new TestResult( new TestInfo(test) );
-				string msg = string.Format( "TestFixtureSetUp failed in {0}", this.FixtureType.Name );
+				string msg = this.FixtureType == null
+                    ? "TestFixtureSetUp failed"
+                    : string.Format( "TestFixtureSetUp failed in {0}", this.FixtureType.Name );
 				result.Failure(msg, null, FailureSite.Parent);
 				suiteResult.AddResult(result);
                 listener.TestFinished(result);