public void ExceptionsThrownWhenSettingFixturesProperlyReported() { var testClassCommand = new TestClassCommand(Reflector.Wrap(typeof(SetFixtureFailureSpy))); testClassCommand.ClassStart(); var method = testClassCommand.TypeUnderTest.GetMethod("Method"); var testCommands = TestCommandFactory.Make(testClassCommand, method); var methodResult = testCommands.Single().Execute(null); // If you get a test failure here, then there's another missing instance of "throw;" where there // is a call to RethrowWithNoStackTraceLoss. Specifically, for this test, it's in FixtureCommand.Execute // Again, it should look like: // // catch (TargetInvocationException ex) // { // ExceptionUtility.RethrowWithNoStackTraceLoss(ex.InnerException); // throw; // <---- New line // } if (!(methodResult is FailedResult)) { throw new ExceptionNotBeingRethrownException("FixtureCommand.Execute"); } Assert.Equal("System.Reflection.TargetInvocationException", ((FailedResult)methodResult).ExceptionType); }
public Exception ClassStart() { GuardTypeUnderTest(); var xunitAssembly = typeof(FactAttribute).Assembly; sandbox = CreatePartialTrustAppDomain(); return(originalTestClassCommand.ClassStart()); }
public Exception ClassStart() { return(cmd.ClassStart()); }
/// <inheritdoc/> public Exception ClassStart() { return(_testClassCommand.ClassStart()); }
public Exception ClassStart() { return(_inner.ClassStart()); }
public virtual Exception ClassStart() { return(_cmd.ClassStart()); }