File tree Expand file tree Collapse file tree
src/test/java/sc/fiji/links Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5454import java .util .List ;
5555
5656import static org .junit .jupiter .api .Assertions .*;
57+ import static org .junit .jupiter .api .Assumptions .assumeFalse ;
5758
5859/**
5960 * Tests {@link OpenLinkHandler}.
@@ -102,14 +103,16 @@ public static void tearDown() {
102103
103104 @ Test
104105 public void testOpenFile () throws URISyntaxException {
106+ var uiService = scifio .get (UIService .class );
107+ assumeFalse (uiService .isHeadless ());
105108 var linkService = scifio .get (LinkService .class );
106109 var tableURL = getClass ().getResource ("molitor.csv" );
107110 assertNotNull (tableURL );
108111 var tableFile = new File (tableURL .toURI ());
109112 assertEquals ("molitor.csv" , tableFile .getName ());
110113 var uri = new URI ("fiji://open/file?p=" +
111114 URLEncoder .encode (tableFile .getAbsolutePath (), StandardCharsets .UTF_8 ));
112- var ui = (MockUI ) scifio . get ( UIService . class ) .getDefaultUI ();
115+ var ui = (MockUI ) uiService .getDefaultUI ();
113116 ui .shown .clear ();
114117 linkService .handle (uri );
115118 assertEquals (1 , ui .shown .size ());
You can’t perform that action at this time.
0 commit comments