Skip to content

Commit 0d6789e

Browse files
FXML version is now used from FXMLLoader.
1 parent 0f173a8 commit 0d6789e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kit/src/test/java/com/oracle/javafx/scenebuilder/kit/fxom/FXOMDocumentTest.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import com.oracle.javafx.scenebuilder.kit.JfxInitializer;
5050

5151
import javafx.application.Platform;
52+
import javafx.fxml.FXMLLoader;
5253

5354
public class FXOMDocumentTest {
5455

@@ -109,13 +110,14 @@ public void that_wildcard_imports_are_built_on_demand() throws Exception {
109110
FXOMDocument classUnderTest = new FXOMDocument(validFxmlText, validResource, null, null);
110111
boolean withWildCardImports = true;
111112

113+
String javaFxVersion = FXMLLoader.JAVAFX_VERSION;
112114
String generatedFxmlText = classUnderTest.getFxmlText(withWildCardImports);
113115
String expectedFxmlText =
114116
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n"
115117
+ "<?import javafx.scene.effect.*?>\n"
116118
+ "<?import javafx.scene.layout.*?>\n"
117119
+ "<?import javafx.scene.text.*?>\n\n"
118-
+ "<StackPane xmlns=\"http://javafx.com/javafx/null\" xmlns:fx=\"http://javafx.com/fxml/1\">\n"
120+
+ "<StackPane xmlns=\"http://javafx.com/javafx/"+javaFxVersion+"\" xmlns:fx=\"http://javafx.com/fxml/1\">\n"
119121
+ " <children>\n"
120122
+ " <Text stroke=\"BLACK\" text=\"Some simple text\">\n"
121123
+ " <effect>\n"

0 commit comments

Comments
 (0)