Created
November 23, 2012 06:36
-
-
Save moznion/4134250 to your computer and use it in GitHub Desktop.
Usage of shouldFail(java.lang.Class clazz, Closure code)
This file contains hidden or 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
import groovy.util.GroovyTestCase | |
public class Test extends GroovyTestCase { | |
public void test() { | |
shouldFail (NullPointerException) {throw new NullPointerException()} | |
shouldFail (IllegalAccessError) {throw new IllegalAccessError()} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment