IntelliJ + Gradle + JUnit5でHelloTestまで
code: build.gradle
...
dependencies {
testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.5.2'
testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.5.2'
}
test {
useJUnitPlatform()
}
code: HelloTest.java
package hogehoge
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
class HelloTest {
@Test
void helloTest() {
assertEquals(1, 1);
}
}
微妙にハマった
IntelliJ側のJUnitプラグインの有効化
これしないと、IntelliJからJUnitが実行できなかった