Changeset 14207 in josm for trunk/test/unit/org
- Timestamp:
- 2018-08-31T03:00:20+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
r14201 r14207 8 8 import java.io.File; 9 9 import java.io.IOException; 10 import java.lang.annotation.Documented; 11 import java.lang.annotation.ElementType; 12 import java.lang.annotation.Retention; 13 import java.lang.annotation.RetentionPolicy; 14 import java.lang.annotation.Target; 10 15 import java.nio.charset.StandardCharsets; 11 16 import java.security.GeneralSecurityException; … … 148 153 149 154 /** 150 * Enable {@ linkMain#platform} global variable.155 * Enable {@code Main#platform} global variable. 151 156 * @return this instance, for easy chaining 152 157 * @deprecated Not needed anymore … … 214 219 215 220 /** 216 * Allow the execution of commands using {@ link Main#undoRedo}221 * Allow the execution of commands using {@code UndoRedoHandler} 217 222 * @return this instance, for easy chaining 218 223 */ … … 325 330 326 331 /** 327 * Use the {@ linkMain#main}, {@code Main.contentPanePrivate}, {@code Main.mainPanel},332 * Use the {@code Main#main}, {@code Main.contentPanePrivate}, {@code Main.mainPanel}, 328 333 * global variables in this test. 329 334 * @return this instance, for easy chaining … … 338 343 339 344 /** 340 * Use the {@ linkMain#main}, {@code Main.contentPanePrivate}, {@code Main.mainPanel},345 * Use the {@code Main#main}, {@code Main.contentPanePrivate}, {@code Main.mainPanel}, 341 346 * global variables in this test. 342 347 * @param mapViewStateMockingRunnable Runnable to use for mocking out any required parts of … … 368 373 @Override 369 374 public Statement apply(Statement base, Description description) { 375 // First process any Override* annotations for per-test overrides. 376 // The following only work because "option" methods modify JOSMTestRules in-place 377 final OverrideAssumeRevision overrideAssumeRevision = description.getAnnotation(OverrideAssumeRevision.class); 378 if (overrideAssumeRevision != null) { 379 this.assumeRevision(overrideAssumeRevision.value()); 380 } 381 final OverrideTimeout overrideTimeout = description.getAnnotation(OverrideTimeout.class); 382 if (overrideTimeout != null) { 383 this.timeout(overrideTimeout.value()); 384 } 370 385 Statement statement = base; 371 386 // counter-intuitively, Statements which need to have their setup routines performed *after* another one need to … … 695 710 getInputArguments().toString().indexOf("-agentlib:jdwp") > 0; 696 711 } 712 713 /** 714 * Override this test's assumed JOSM version (as reported by {@link Version}). 715 * @see JOSMTestRules#assumeRevision(String) 716 */ 717 @Documented 718 @Retention(RetentionPolicy.RUNTIME) 719 @Target(ElementType.METHOD) 720 public @interface OverrideAssumeRevision { 721 /** 722 * Returns overriden assumed JOSM version. 723 * @return overriden assumed JOSM version 724 */ 725 String value(); 726 } 727 728 /** 729 * Override this test's timeout. 730 * @see JOSMTestRules#timeout(int) 731 */ 732 @Documented 733 @Retention(RetentionPolicy.RUNTIME) 734 @Target(ElementType.METHOD) 735 public @interface OverrideTimeout { 736 /** 737 * Returns overriden timeout value. 738 * @return overriden timeout value 739 */ 740 int value(); 741 } 697 742 }
Note:
See TracChangeset
for help on using the changeset viewer.