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 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 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 FailedConstructionTest method failedConstructionIsTestFailure.
@Test
public void failedConstructionIsTestFailure() {
Result result = JUnitCore.runClasses(CantConstruct.class);
Failure failure = result.getFailures().get(0);
Description expected = Description.createTestDescription(CantConstruct.class, "foo");
Assert.assertEquals(expected, failure.getDescription());
}
Aggregations