You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Stanislav (Jira)" <de...@myfaces.apache.org> on 2021/08/16 11:02:00 UTC

[jira] [Created] (MYFACES-4408) Test classes wich extends AbstractJsfConfigurableMockTestCase are running with junit3

Stanislav created MYFACES-4408:
----------------------------------

             Summary: Test classes wich extends AbstractJsfConfigurableMockTestCase are running with junit3
                 Key: MYFACES-4408
                 URL: https://issues.apache.org/jira/browse/MYFACES-4408
             Project: MyFaces Core
          Issue Type: Bug
          Components: JSR-372
    Affects Versions: 2.3-next-M6
         Environment: junit 4.13.2, myfaces-test 2.3-next-M6
            Reporter: Stanislav


JUnit38ClassRunner is used for tests when test classes extends AbstractJsfConfigurableMockTestCase. It is because AbstractJsfConfigurableMockTestCase extends TestCase and there is check in JUnit3Builder 


{code:java}
public class JUnit3Builder extends RunnerBuilder {
    @Override
    public Runner runnerForClass(Class<?> testClass) throws Throwable {
        if (isPre4Test(testClass)) {
            return new JUnit38ClassRunner(testClass);
        }
        return null;
    }    boolean isPre4Test(Class<?> testClass) {
        return junit.framework.TestCase.class.isAssignableFrom(testClass);
    }
}
{code}
Is it correct, that jsf tests have to run with Junit 3?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)