public void FailWhenInnerExceptionIsNotCorrectType() { AssertAll.ThrowsExceptionWithInnerException <ArgumentException>(() => ThrowExceptionWithInnerInvalidOperationException(true)); Assert.ThrowsException <AssertAllFailedException>(() => AssertAll.Execute()); }
public void PassWhenInnerExceptionIsOfCorrectType() { AssertAll.ThrowsExceptionWithInnerException <InvalidOperationException>(() => ThrowExceptionWithInnerInvalidOperationException(true)); AssertAll.Execute(); }
public void FailWhenNoExceptionIsThrown() { var list = new List <object>() { new object() }; AssertAll.ThrowsExceptionWithInnerException <InvalidOperationException>(() => ThrowExceptionWithInnerInvalidOperationException(false)); Assert.ThrowsException <AssertAllFailedException>(() => AssertAll.Execute()); }