Changeset 16658 in josm for trunk/test/unit/org
- Timestamp:
- 2020-06-16T18:58:48+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
r16657 r16658 104 104 private boolean metric; 105 105 private boolean main; 106 /** 107 * This boolean is only used to indicate if JUnit5 is used in a test. If it is, 108 * we must not call after in {@link JOSMTestRules.CreateJosmEnvironment#evaluate}. 109 * TODO: Remove JUnit4 as a whole sometime after 2021-01-01 (~6 month lead time for plugins) 110 */ 111 private boolean junit5; 106 112 107 113 /** … … 438 444 @Override 439 445 public void beforeEach(ExtensionContext context) throws Exception { 446 this.junit5 = true; 440 447 Statement temporaryStatement = new Statement() { 441 448 @Override … … 455 462 @Override 456 463 public void afterEach(ExtensionContext context) throws Exception { 457 // do nothing for now464 after(); 458 465 } 459 466 … … 690 697 base.evaluate(); 691 698 } finally { 692 after(); 699 if (!junit5) { 700 after(); 701 } 693 702 } 694 703 }
Note:
See TracChangeset
for help on using the changeset viewer.