use of junit.tests.WasRun in project junit4 by junit-team.
the class ExtensionTest method testSetupErrorDontTearDown.
public void testSetupErrorDontTearDown() {
WasRun test = new WasRun();
TornDown wrapper = new TornDown(test) {
@SuppressWarnings("deprecation")
@Override
public void setUp() {
fail();
}
};
TestResult result = new TestResult();
wrapper.run(result);
assertTrue(!wrapper.fTornDown);
}
use of junit.tests.WasRun in project junit4 by junit-team.
the class TestCaseTest method testWasRun.
public void testWasRun() {
WasRun test = new WasRun();
test.run();
assertTrue(test.fWasRun);
}
use of junit.tests.WasRun in project junit4 by junit-team.
the class ExtensionTest method testSetupErrorInTestSetup.
public void testSetupErrorInTestSetup() {
WasRun test = new WasRun();
TestSetup wrapper = new TestSetup(test) {
@SuppressWarnings("deprecation")
@Override
public void setUp() {
fail();
}
};
TestResult result = new TestResult();
wrapper.run(result);
assertTrue(!test.fWasRun);
assertTrue(!result.wasSuccessful());
}
Aggregations