package deltadak;

import javafx.application.Application;
import javafx.scene.control.ProgressIndicator;
import org.junit.Before;
import org.junit.jupiter.api.Test;
import org.testfx.api.FxRobot;
import org.testfx.api.FxToolkit;

import java.util.concurrent.TimeoutException;

import static org.junit.Assert.fail;
import static org.junit.jupiter.api.Assertions.assertTrue;

/**
 *
 */
public class JavaFXTest extends FxRobot {

//    /**
//     * @throws Exception oh
//     */
//    @Before
//    public void before() throws Exception {
//        FxToolkit.registerPrimaryStage();
//        FxToolkit.setupApplication(HelloJavaFX.class);
//    }

    /**
     *
     */
    @Test
    public void testProgress() throws TimeoutException {
        // Initialise JavaFX.
        FxToolkit.registerPrimaryStage();
        FxToolkit.setupApplication(HelloJavaFX.class);

        HelloJavaFX helloJavaFX = new HelloJavaFX();

        ProgressIndicator progressIndicator = new ProgressIndicator();

        assertTrue(helloJavaFX.setLoading(progressIndicator));

        fail("it works!");

    }

}
@@ -16,47 +16,8 @@
 k;%0A%0A
-import javafx.application.Application;%0A
 impo
@@ -63,33 +63,8 @@
 or;%0A
-import org.junit.Before;%0A
 impo
@@ -210,45 +210,8 @@
 n;%0A%0A
-import static org.junit.Assert.fail;%0A
 impo
@@ -272,16 +272,48 @@
 %0A%0A/**%0A *
+ Test general JavaFX components.
 %0A */%0Apub
@@ -356,18 +356,16 @@
  %7B%0A%0A
-//
     /**%0A
 //  
@@ -364,232 +364,133 @@
 /**%0A
-//
      * 
-@throws Exception oh%0A//     */%0A//    @Before%0A//    public void before() throws Exception %7B%0A//        FxToolkit.registerPrimaryStage();%0A//        FxToolkit.setupApplication(HelloJavaFX.class);%0A//    %7D%0A%0A    /**%0A     *
+Tests that testing JavaFX components works.%0A     *%0A     * @throws TimeoutException When initialising JavaFX times out.
 %0A   
@@ -883,36 +883,8 @@
 );%0A%0A
-        fail(%22it works!%22);%0A%0A
     

fix javafx test