Search in sources :

Example 1 with JUnit5Framework

use of com.intellij.execution.junit.JUnit5Framework in project intellij-community by JetBrains.

the class JUnit5AcceptanceTest method testFrameworkDetection.

@Test
void testFrameworkDetection() {
    doTest(() -> {
        PsiClass aClass = myFixture.addClass("class MyTest {@org.junit.jupiter.api.Test void method() {}}");
        assertNotNull(aClass);
        TestFramework framework = TestFrameworks.detectFramework(aClass);
        assertTrue(framework instanceof JUnit5Framework, framework.getName());
    });
}
Also used : TestFramework(com.intellij.testIntegration.TestFramework) PsiClass(com.intellij.psi.PsiClass) JUnit5Framework(com.intellij.execution.junit.JUnit5Framework) Test(org.junit.jupiter.api.Test)

Aggregations

JUnit5Framework (com.intellij.execution.junit.JUnit5Framework)1 PsiClass (com.intellij.psi.PsiClass)1 TestFramework (com.intellij.testIntegration.TestFramework)1 Test (org.junit.jupiter.api.Test)1