Search in sources :

Example 6 with JUnit38ClassRunner

use of org.junit.internal.runners.JUnit38ClassRunner in project junit4 by junit-team.

the class JUnit38ClassRunnerTest method getDescriptionWithAnnotation.

@Test
public void getDescriptionWithAnnotation() {
    JUnit38ClassRunner runner = new JUnit38ClassRunner(JUnit3ClassWithAnnotatedMethod.class);
    assertAnnotationFiltering(runner);
}
Also used : JUnit38ClassRunner(org.junit.internal.runners.JUnit38ClassRunner) Test(org.junit.Test)

Example 7 with JUnit38ClassRunner

use of org.junit.internal.runners.JUnit38ClassRunner in project junit4 by junit-team.

the class JUnit38ClassRunnerTest method getDescriptionWithAnnotationInSuper.

@Test
public void getDescriptionWithAnnotationInSuper() {
    JUnit38ClassRunner runner = new JUnit38ClassRunner(DerivedAnnotatedMethod.class);
    assertAnnotationFiltering(runner);
}
Also used : JUnit38ClassRunner(org.junit.internal.runners.JUnit38ClassRunner) Test(org.junit.Test)

Example 8 with JUnit38ClassRunner

use of org.junit.internal.runners.JUnit38ClassRunner in project junit4 by junit-team.

the class MaxStarterTest method filterSingleMethodFromOldTestClass.

@Test
public void filterSingleMethodFromOldTestClass() throws Exception {
    final Description method = Description.createTestDescription(TwoOldTests.class, "testOne");
    Filter filter = Filter.matchMethodDescription(method);
    JUnit38ClassRunner child = new JUnit38ClassRunner(TwoOldTests.class);
    child.filter(filter);
    assertEquals(1, child.testCount());
}
Also used : Description(org.junit.runner.Description) Filter(org.junit.runner.manipulation.Filter) JUnit38ClassRunner(org.junit.internal.runners.JUnit38ClassRunner) Test(org.junit.Test)

Example 9 with JUnit38ClassRunner

use of org.junit.internal.runners.JUnit38ClassRunner in project kotlin by JetBrains.

the class JUnit3RunnerWithInners method filter.

@Override
public void filter(Filter filter) throws NoTestsRemainException {
    delegateRunner = new JUnit38ClassRunner(klass);
    delegateRunner.filter(filter);
}
Also used : JUnit38ClassRunner(org.junit.internal.runners.JUnit38ClassRunner)

Aggregations

JUnit38ClassRunner (org.junit.internal.runners.JUnit38ClassRunner)9 Test (org.junit.Test)7 TestSuite (junit.framework.TestSuite)2 Result (org.junit.runner.Result)2 TestDecorator (junit.extensions.TestDecorator)1 AssertionFailedError (junit.framework.AssertionFailedError)1 JUnit4TestAdapter (junit.framework.JUnit4TestAdapter)1 TestCase (junit.framework.TestCase)1 TestListener (junit.framework.TestListener)1 Description (org.junit.runner.Description)1 JUnitCore (org.junit.runner.JUnitCore)1 Filter (org.junit.runner.manipulation.Filter)1 Failure (org.junit.runner.notification.Failure)1 RunListener (org.junit.runner.notification.RunListener)1 RunNotifier (org.junit.runner.notification.RunNotifier)1