Changeset 17277 in josm for trunk


Ignore:
Timestamp:
2020-10-28T23:52:47+01:00 (4 years ago)
Author:
Don-vip
Message:

see #16567 - fix more obvious test errors

Location:
trunk/test/unit/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java

    r17276 r17277  
    33
    44import static org.junit.jupiter.api.Assertions.assertTrue;
     5
     6import java.awt.GraphicsEnvironment;
    57
    68import org.junit.jupiter.api.Test;
     
    8688            }
    8789        };
    88         new MockUp<SaveLayersDialog>() {
    89             @Mock
    90             private void closeDialog(Invocation invocation) {
    91                 saveLayersDialogCloseDialogCalled[0] = true;
    92             }
    93         };
     90        if (!GraphicsEnvironment.isHeadless()) {
     91            new MockUp<SaveLayersDialog>() {
     92                @Mock
     93                private void closeDialog(Invocation invocation) {
     94                    saveLayersDialogCloseDialogCalled[0] = true;
     95                }
     96            };
     97        }
    9498
    9599        // No layer
     
    105109            assertTrue(imageProviderShutdownCalledNowTrue[0]);
    106110            assertTrue(jcsCacheManagerShutdownCalled[0]);
    107             assertTrue(saveLayersDialogCloseDialogCalled[0]);
     111            if (!GraphicsEnvironment.isHeadless()) {
     112                assertTrue(saveLayersDialogCloseDialogCalled[0]);
     113            }
    108114        }
    109115    }
  • trunk/test/unit/org/openstreetmap/josm/data/osm/search/SearchCompilerTest.java

    r17275 r17277  
    604604        TaggingPresets.readFromPreferences();
    605605
    606         assertThrows(IllegalArgumentException.class, () -> SearchCompiler.compile(settings));
     606        assertThrows(SearchParseError.class, () -> SearchCompiler.compile(settings));
    607607    }
    608608
Note: See TracChangeset for help on using the changeset viewer.