ExpectedExceptionBaseAttribute and “Object reference not set to an instance of an object”

You’re writing unit tests with Visual Studio and you want to verify that you’re throwing the correct Exception. You could use ExpectedExceptionAttribute class but it only allows you to verify the type of the Exception. You might want to verify other properties so you decide to create a subclass of ExpectedExceptionBaseAttribute, which allows you to have …