ExpectedWarning attribute will not check for warnings when on a static constructor. For example, the following test will pass:
RequiresCapability.cs:
class ClassWithConstructors
{
[ExpectedWarning ("WarningThatNeverComes", "LoremIpsum")]
static ClassWithConstructors()
{
}
[ExpectedWarning("NoWarningWillCome", "asdfjkl;")]
public ClassWithConstructors() { }
}