Created
November 19, 2014 15:56
-
-
Save DerSchimi/681349209dafadd37a73 to your computer and use it in GitHub Desktop.
Groovy reading spock feature methods
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
private void checkAllMethods(Class c){ | |
def testmethods = c.methods.findAll {it.getName().startsWith('$spock_feature')} | |
println "methods: " +testmethods*.getName() | |
testmethods.each { | |
Method m = it; | |
m.getAnnotations().each { | |
println it | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment