For anyone interested, I think I found a workaround. The following adding seems to do the trick:
[NUnitAddin(Description = "Stop Upon Failure")] public class StopUponFailureAddIn : IAddin, EventListener { #region IAddin Members
public bool Install(IExtensionHost host) { if (host == null) throw new ArgumentNullException("host");
IExtensionPoint listeners = host.GetExtensionPoint("EventListeners"); if (listeners == null) return false;
listeners.Install(this); return true; }
#endregion
#region EventListener Members
public void RunFinished(Exception exception) { }
public void RunFinished(TestResult result) { }
public void RunStarted(string name, int testCount) { }
public void SuiteFinished(TestResult result) { }
public void SuiteStarted(TestName testName) { }
public void TestFinished(TestResult result) { if (result.IsError || result.IsFailure) { Trace.WriteLine("STOPPING TEST EXECUTION"); Thread.Sleep(Timeout.Infinite); } }
public void TestOutput(TestOutput testOutput) { }
public void TestStarted(TestName testName) { }
public void UnhandledException(Exception exception) { }
#endregion }
For anyone interested, I think I found a workaround. The following adding seems to do the trick:
[NUnitAddin( Description = "Stop Upon Failure")] AddIn : IAddin, EventListener
public class StopUponFailure
{
#region IAddin Members
public bool Install( IExtensionHost host) eption( "host") ;
{
if (host == null)
throw new ArgumentNullExc
if (listeners == null)
return false;
return true;
}
#endregion
#region EventListener Members
public void RunFinished( Exception exception)
{
}
public void RunFinished( TestResult result)
{
}
public void RunStarted(string name, int testCount)
{
}
public void SuiteFinished( TestResult result)
{
}
public void SuiteStarted( TestName testName)
{
}
public void TestFinished( TestResult result)
Trace. WriteLine( "STOPPING TEST EXECUTION");
Thread. Sleep(Timeout. Infinite) ;
{
if (result.IsError || result.IsFailure)
{
}
}
public void TestOutput( TestOutput testOutput)
{
}
public void TestStarted( TestName testName)
{
}
public void UnhandledExcept ion(Exception exception)
{
}
#endregion
}