~adam-rpconnelly/nunit-3.0/bug-483845

« back to all changes in this revision

Viewing changes to src/framework/Internal/ExpectedExceptionProcessor.cs

  • Committer: Charlie Poole
  • Date: 2010-01-08 17:21:03 UTC
  • Revision ID: charlie@nunit.com-20100108172103-o065jps8sbft4hhq
Further simplification of API and internals: Removing TestInfo and NUnitFramework classes, eliminating all references to the framework from the test runner and using xml to communicate results back to the runner.

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
            }
142
142
            else
143
143
            {
144
 
                switch (NUnitFramework.GetResultState(exception))
145
 
                {
146
 
                    case ResultState.Failure:
147
 
                        testResult.Failure(exception.Message, exception.StackTrace);
148
 
                        break;
149
 
                    case ResultState.Ignored:
150
 
                        testResult.Ignore(exception);
151
 
                        break;
152
 
                    case ResultState.Inconclusive:
153
 
                        testResult.SetResult(ResultState.Inconclusive, exception);
154
 
                        break;
155
 
                    case ResultState.Success:
156
 
                        testResult.Success(exception.Message);
157
 
                        break;
158
 
                    default:
159
 
                        testResult.Failure(WrongTypeMessage(exception), GetStackTrace(exception));
160
 
                        break;
161
 
                }
 
144
                testResult.SetResult(exception);
 
145
 
 
146
                // If it shows as an error, change it to a failure due to the wrong type
 
147
                if (testResult.ResultState == ResultState.Error)
 
148
                    testResult.Failure(WrongTypeMessage(exception), GetStackTrace(exception));
162
149
            }
163
150
                }
164
151
        #endregion