Changeset 16617 in josm for trunk/test
- Timestamp:
- 2020-06-14T11:54:09+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
r16321 r16617 24 24 25 25 import org.awaitility.Awaitility; 26 import org.junit.jupiter.api.extension.AfterEachCallback; 27 import org.junit.jupiter.api.extension.BeforeEachCallback; 28 import org.junit.jupiter.api.extension.ExtensionContext; 26 29 import org.junit.rules.TemporaryFolder; 27 30 import org.junit.rules.TestRule; … … 79 82 * @author Michael Zangl 80 83 */ 81 public class JOSMTestRules implements TestRule {84 public class JOSMTestRules implements TestRule, AfterEachCallback, BeforeEachCallback { 82 85 private int timeout = isDebugMode() ? -1 : 10 * 1000; 83 86 private TemporaryFolder josmHome; … … 433 436 } 434 437 438 @Override 439 public void beforeEach(ExtensionContext context) throws Exception { 440 Statement temporaryStatement = new Statement() { 441 @Override 442 public void evaluate() throws Throwable { 443 // do nothing 444 } 445 }; 446 try { 447 this.apply(temporaryStatement, 448 Description.createTestDescription(this.getClass(), "JOSMTestRules JUnit5 Compatibility")) 449 .evaluate(); 450 } catch (Throwable e) { 451 throw new Exception(e); 452 } 453 } 454 455 @Override 456 public void afterEach(ExtensionContext context) throws Exception { 457 // do nothing for now 458 } 459 435 460 /** 436 461 * Set up before running a test
Note:
See TracChangeset
for help on using the changeset viewer.