NUnit: Assert.Throws
- by epitka
How do I use Assert.Throws to assert type of the exception and the actual message workding.
Something like this:
Assert.Throws<Exception>(
()=>user.MakeUserActive()).WithMessage("Actual exception message")
Method I am testing throws multiple messages of the same type, with different message and I need a way to test that correct message is thrown depending on the context.