Created
February 17, 2013 13:17
-
-
Save aeg/4971454 to your computer and use it in GitHub Desktop.
Spockと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
import org.junit.Test | |
import org.junit.experimental.runners.Enclosed | |
import org.junit.runner.RunWith; | |
import spock.lang.Specification | |
@RunWith(Enclosed.class) | |
class SpockJUnitMixTest { | |
static class Spockテストグループ1 extends Specification{ | |
def "Spockテスト1-1"() { | |
when: | |
println "Spock test1:" | |
then: | |
true | |
} | |
} | |
static class Spockテストグループ2 extends Specification { | |
def "Spockテスト2-1"() { | |
when: | |
println "Spock test2:" | |
then: | |
true | |
} | |
} | |
static class JUnitテストグループ { | |
@Test | |
public void junitのテスト() { | |
System.out.println("JUnit test:"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment