Created
April 18, 2011 16:17
-
-
Save ElemarJR/925632 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public static void Class_AllStaticMethodsShouldBeDecoratedWithDebuggerStepThroughAttribute() | |
{ | |
var methods = from m in typeof(Mooble.Util.StringExtensions).GetMethods() | |
where !m.IsSpecialName && m.IsStatic && | |
m.GetCustomAttributes(typeof(DebuggerStepThroughAttribute), true).Count() == 0 | |
select m.Name; | |
if (methods.Count() > 0) | |
{ | |
var list = methods.Aggregate((first, second) => first + ", " + second); | |
Assert.Fail("Some methods (" + list + ") should be decorated with DebuggerStepThroughAttribute"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment