我有一个使用JUnit 5.2.0的Kotlin项目。当我使用IntelliJ运行测试时,它会运行所有测试,甚至包括那些用@org.junit.Ignore
注释的测试。
package my.package
import org.junit.Ignore
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
class ExampleTests {
@Test fun runMe() {
assertEquals(1, 1)
}
@Test @Ignore fun dontRunMe() {
assertEquals(1, 0)
}
}
有人可以向我解释为什么会这样吗?