public void PassWhenExceptionMethodEqualsArgument() { var message = RandomValue.String(); AssertAll.ExceptionMessageEquals(() => ThrowExceptionWithMessage(message), message); AssertAll.Execute(); }
public void FailWhenExceptionIsNotThrown() { var notEqual = RandomValue.String(); var message = RandomValue.String(); AssertAll.ExceptionMessageEquals(() => ThrowExceptionWithMessage(message, false), notEqual); Assert.ThrowsException <AssertAllFailedException>(() => AssertAll.Execute()); }