I have an example class
public class MyClass{
ActionResult Method1(){
....
}
[Authorize]
ActionResult Method2(){
....
}
If you make use of FluentAssertions you can do the following:
var classInstance = new MyClass();
Func method1 = classInstance.Method1;
method1.GetMethodInfo().Should().BeDecoratedWith();
Func method2 = classInstance.Method2;
method2.GetMethodInfo().Should().BeDecoratedWith();
Func method3 = classInstance.Method3;
method3.GetMethodInfo().Should().BeDecoratedWith();