Vorrei testare un metodo che mi aspetto di bloccare in una situazione specifica.È possibile che NUnit si aspetti un timeout?
ho provato una combinazione di TimeoutAttribute
e ExpectedExceptionAttribute
:
[Test]
[Timeout(50), ExpectedException(typeof(ThreadAbortException))]
public void BlockingCallShouldBlock()
{
this.SomeBlockingCall();
}
Purtroppo questo non funziona come il ThreadAbortException
stavo leggendo su here sembra farsi prendere dal NUnit per sé.
C'è un modo per aspettarsi timeout (con NUnit)?