Created
August 3, 2012 13:40
-
-
Save irof/3247792 to your computer and use it in GitHub Desktop.
GroovyでJUnit
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
@Grab('junit:junit:4.10') | |
import org.junit.* | |
public class HogeTest { | |
@Test | |
public void ふつうのテスト() { | |
assert 1 == 2 | |
} | |
@Test | |
public void 失敗すると、こー() { | |
assert 1 == 2 | |
} | |
@Test | |
public void "1とか数字始まりも囲えば良いよね"() { | |
assert 1 == 1 | |
} | |
} |
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
JUnit 4 Runner, Tests: 3, Failures: 2, Time: 16 | |
Test Failure: 失敗すると、こー(HogeTest) | |
Assertion failed: | |
assert 1 == 2 | |
| | |
false | |
at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:386) | |
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:658) | |
at HogeTest.失敗すると、こー(ConsoleScript15:13) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment