Skip to content

Commit

Permalink
Only perform the test when JFXPanel is available
Browse files Browse the repository at this point in the history
  • Loading branch information
jtulach committed Feb 21, 2021
1 parent b48dd4d commit d9b2df1
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.netbeans.libs.javafx;

import javafx.embed.swing.JFXPanel;
import junit.framework.Test;
import org.netbeans.junit.NbModuleSuite;
import org.netbeans.junit.NbTestCase;
Expand All @@ -42,6 +43,11 @@ public static Test suite() {
}

public void testIsFxModuleEnabled() throws Exception {
try {
JFXPanel p = new JFXPanel();
} catch (RuntimeException | LinkageError err) {
return;
}
for (ModuleInfo mi : Lookup.getDefault().lookupAll(ModuleInfo.class)) {
if (mi.getCodeNameBase().equals("org.netbeans.libs.javafx")) {
assertTrue("Enabled", mi.isEnabled());
Expand Down

0 comments on commit d9b2df1

Please sign in to comment.