protected void CheckSetUpTearDownMethods(Type attrType)
{
foreach (MethodInfo method in Reflect.GetMethodsWithAttribute(TypeInfo.Type, attrType, true))
if (method.IsAbstract ||
!method.IsPublic && !method.IsFamily ||
method.GetParameters().Length > 0 ||
method.ReturnType != typeof(void)
#if ASYNC
&&
method.ReturnType != typeof(Task)
#endif
)
{
this.Properties.Set(
PropertyNames.SkipReason,
string.Format("Invalid signature for SetUp or TearDown method: {0}", method.Name));
this.RunState = RunState.NotRunnable;
break;
}
}