public void FailWhenNoExceptionIsThrown() { AssertAll.ThrowsExceptionAsync <NotImplementedException>(async() => await ThrowContrivedException(false)); Assert.ThrowsException <AssertAllFailedException>(() => AssertAll.Execute()); }
public void FailWhenWrongExceptionIsThrown() { AssertAll.ThrowsExceptionAsync <NullReferenceException>(async() => await ThrowContrivedException(true)); Assert.ThrowsException <AssertAllFailedException>(() => AssertAll.Execute()); }
public void PassWhenExceptionOfCorrectTypeIsThrown() { AssertAll.ThrowsExceptionAsync <NotImplementedException>(async() => await ThrowContrivedException(true)); AssertAll.Execute(); }