I think it is correct to test for both Exception type and message. And both are easy in xUnit:
var exception = Assert.Throws<AuthenticationException>(() => DoSomething());
Assert.Equal(message, exception.Message);
I think it is correct to test for both Exception type and message. And both are easy in xUnit:
var exception = Assert.Throws<AuthenticationException>(() => DoSomething());
Assert.Equal(message, exception.Message);