Some fixes, create initial test class
This commit is contained in:
24
javafx-template/src/test/java/app/AppTest.java
Normal file
24
javafx-template/src/test/java/app/AppTest.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package app;
|
||||
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.testfx.framework.junit5.ApplicationTest;
|
||||
|
||||
/**
|
||||
* TestFX App test
|
||||
*/
|
||||
public class AppTest extends ApplicationTest {
|
||||
|
||||
@Override
|
||||
public void start(Stage stage) throws IOException {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(this.getClass().getResource("App.fxml"));
|
||||
Parent parent = fxmlLoader.load();
|
||||
stage.setScene(new Scene(parent));
|
||||
stage.show();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user