use of org.junit.runner.Runner in project junit4 by junit-team.
the class AnnotatedBuilderTest method topLevelTestClassWithAnnotation_isRunWithAnnotatedRunner.
@Test
public void topLevelTestClassWithAnnotation_isRunWithAnnotatedRunner() throws Exception {
Runner runner = builder.runnerForClass(OuterClass.class);
assertThat(runner, is(instanceOf(RunnerSpy.class)));
RunnerSpy runnerSpy = (RunnerSpy) runner;
assertThat(runnerSpy.getInvokedTestClass(), is((Object) OuterClass.class));
}
use of org.junit.runner.Runner in project junit4 by junit-team.
the class SortingRequest method getRunner.
@Override
public Runner getRunner() {
Runner runner = request.getRunner();
new Sorter(comparator).apply(runner);
return runner;
}
use of org.junit.runner.Runner in project junit4 by junit-team.
the class EnclosedTest method enclosedRunnerPlansConcreteEnclosedClasses.
@Test
public void enclosedRunnerPlansConcreteEnclosedClasses() throws Exception {
Runner runner = Request.aClass(Enclosing.class).getRunner();
assertEquals(5, runner.testCount());
}
use of org.junit.runner.Runner in project junit4 by junit-team.
the class ParameterizedTestTest method countBeforeRun.
@Test
public void countBeforeRun() throws Exception {
Runner runner = Request.aClass(AdditionTest.class).getRunner();
assertEquals(4, runner.testCount());
}
use of org.junit.runner.Runner in project junit4 by junit-team.
the class ParameterizedTestTest method usesIndexAsTestName.
@Test
public void usesIndexAsTestName() {
Runner runner = Request.aClass(ParameterizedWithoutSpecialTestname.class).getRunner();
Description description = runner.getDescription();
assertEquals("[1]", description.getChildren().get(1).getDisplayName());
}
Aggregations