[AttributeUsage(AttributeTargets.Method)]
public class ProjectReloadRequiredAfterTestAttribute
: System.Attribute
{
}
public void Discover(MethodBase mb)
{
if (mb.GetCustomAttributes(typeof(
ProjectReloadRequiredAfterTestAttribute),
false).Length > 0)
{
reloadProjectRequired = true;
}
}
[Test]
[ProjectReloadRequiredAfterTestAttribute]
public void TestCreateAndDeletePart()
{
Discover(System.Reflection.MethodBase.GetCurrentMethod());
...
}
No comments:
Post a Comment