use of org.junit.runner.Description in project junit4 by junit-team.
the class JUnit38SortingTest method preferRecentlyFailed38Test.
@Test
public void preferRecentlyFailed38Test() {
Request request = Request.classes(JUnit4Test.class, JUnit38Test.class);
fMax.run(request);
List<Description> tests = fMax.sortedLeavesForTest(request);
Description dontSucceed = Description.createTestDescription(JUnit38Test.class, "testFails");
assertEquals(dontSucceed, tests.get(0));
}
use of org.junit.runner.Description in project junit4 by junit-team.
the class MaxStarterTest method sortTestsInMultipleClasses.
@Test
public void sortTestsInMultipleClasses() {
Request request = Request.classes(Computer.serial(), TwoTests.class, TwoTests.class);
fMax.run(request);
List<Description> tests = fMax.sortedLeavesForTest(request);
Description dontSucceed = Description.createTestDescription(TwoTests.class, "dontSucceed");
assertEquals(dontSucceed, tests.get(0));
assertEquals(dontSucceed, tests.get(1));
}
use of org.junit.runner.Description in project junit4 by junit-team.
the class MaxStarterTest method preferFast.
@Test
public void preferFast() {
Request request = Request.aClass(TwoUnEqualTests.class);
fMax.run(request);
Description thing = fMax.sortedLeavesForTest(request).get(1);
assertEquals(Description.createTestDescription(TwoUnEqualTests.class, "slow"), thing);
}
use of org.junit.runner.Description in project junit4 by junit-team.
the class MaxStarterTest method preferRecentlyFailed.
@Test
public void preferRecentlyFailed() {
Request request = Request.aClass(TwoTests.class);
fMax.run(request);
List<Description> tests = fMax.sortedLeavesForTest(request);
Description dontSucceed = Description.createTestDescription(TwoTests.class, "dontSucceed");
assertEquals(dontSucceed, tests.get(0));
}
use of org.junit.runner.Description in project ceylon-compiler by ceylon.
the class CeylonTestRunner method runChild.
@Override
protected void runChild(Method method, RunNotifier notifier) {
Description description = describeChild(method);
notifier.fireTestStarted(description);
Failure failure = null;
try {
failure = executeTest(method, description);
} finally {
if (failure != null) {
notifier.fireTestFailure(failure);
}
}
notifier.fireTestFinished(description);
}
Aggregations