Changeset 14332 in josm for trunk/test/unit/org/openstreetmap/josm/testutils/mockers/JOptionPaneSimpleMocker.java
- Timestamp:
- 2018-10-14T17:30:28+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/testutils/mockers/JOptionPaneSimpleMocker.java
r14052 r14332 134 134 } 135 135 136 /** 137 * Target for overriding, similar to {@link #getMockResultForMessage} except with the implication it 138 * will only be invoked once per dialog display, therefore ideal opportunity to perform any mutating 139 * actions, e.g. making a selection on a widget. 140 * @param message message 141 */ 142 protected void act(final Object message) { 143 // Override in sub-classes 144 } 145 136 146 protected Object[] getInvocationLogEntry( 137 147 final Object message, … … 162 172 ) { 163 173 try { 174 this.act(message); 164 175 final Object result = this.getMockResultForMessage(message); 165 176 if (selectionValues == null) { … … 216 227 ) { 217 228 try { 229 this.act(message); 218 230 // why look up a "result" for a message dialog which can only have one possible result? it's 219 231 // a good opportunity to assert its contents … … 263 275 ) { 264 276 try { 277 this.act(message); 265 278 final Object result = this.getMockResultForMessage(message); 266 279 if (!(result instanceof Integer && Ints.contains(optionTypePermittedResults.get(optionType), (int) result))) {
Note:
See TracChangeset
for help on using the changeset viewer.