public void TestIsDefined()
{
Assert.True(Attribute.IsDefined(typeof(MyDerivedClass), typeof(MyCustomAttribute)));
Assert.True(Attribute.IsDefined(typeof(MyDerivedClass), typeof(YourCustomAttribute)));
Assert.False(Attribute.IsDefined(typeof(MyDerivedClass), typeof(UnusedAttribute)));
Assert.True(Attribute.IsDefined(typeof(MyDerivedClass), typeof(MyCustomAttribute), true));
Assert.True(Attribute.IsDefined(typeof(MyDerivedClass), typeof(YourCustomAttribute), true));
Assert.False(Attribute.IsDefined(typeof(MyDerivedClass), typeof(UnusedAttribute), false));
Assert.True(Attribute.IsDefined(typeof(MyDerivedClass), typeof(MyCustomAttribute), false));
Assert.False(Attribute.IsDefined(typeof(MyDerivedClass), typeof(YourCustomAttribute), false));
Assert.False(Attribute.IsDefined(typeof(MyDerivedClass), typeof(UnusedAttribute), false));
Assert.True(Attribute.IsDefined(typeof(MyClass).GetMethod("ParamsMethod").GetParameters()[0], typeof(ParamArrayAttribute), false));
Assert.False(Attribute.IsDefined(typeof(MyDerivedClassNoAttribute), typeof(MyCustomAttribute)));
}