From 89447f9858f8af41ba792e19bbdf603d670cf26e Mon Sep 17 00:00:00 2001 From: Dominic Rogetzer Date: Wed, 2 May 2018 18:04:19 +0200 Subject: Remove 'test'-suffix of CreateNewEmployeeApplicationTest --- .../employee/CreateNewEmployeeApplication.java | 59 ++++++++++++++++++++++ .../employee/CreateNewEmployeeApplicationTest.java | 59 ---------------------- 2 files changed, 59 insertions(+), 59 deletions(-) create mode 100644 src/test/java/at/ac/tuwien/sepm/assignment/groupphase/employee/CreateNewEmployeeApplication.java delete mode 100644 src/test/java/at/ac/tuwien/sepm/assignment/groupphase/employee/CreateNewEmployeeApplicationTest.java (limited to 'src/test/java/at/ac/tuwien/sepm/assignment/groupphase') diff --git a/src/test/java/at/ac/tuwien/sepm/assignment/groupphase/employee/CreateNewEmployeeApplication.java b/src/test/java/at/ac/tuwien/sepm/assignment/groupphase/employee/CreateNewEmployeeApplication.java new file mode 100644 index 0000000..66c7e56 --- /dev/null +++ b/src/test/java/at/ac/tuwien/sepm/assignment/groupphase/employee/CreateNewEmployeeApplication.java @@ -0,0 +1,59 @@ +package at.ac.tuwien.sepm.assignment.groupphase.employee; + +import at.ac.tuwien.sepm.assignment.groupphase.application.MainApplication; +import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.util.SpringFXMLLoader; +import java.lang.invoke.MethodHandles; +import javafx.application.Application; +import javafx.scene.Parent; +import javafx.scene.Scene; +import javafx.stage.Stage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.annotation.AnnotationConfigApplicationContext; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.stereotype.Component; + +@Component +@ComponentScan("at.ac.tuwien.sepm.assignment.groupphase") +public final class CreateNewEmployeeApplication extends Application { + + private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); + + public static AnnotationConfigApplicationContext context; + + @Override + public void start(Stage primaryStage) throws Exception { + // setup application + primaryStage.setTitle("Person anlegen"); + primaryStage.setWidth(1366); + primaryStage.setHeight(768); + primaryStage.centerOnScreen(); + primaryStage.setOnCloseRequest(event -> LOG.debug("Application shutdown initiated")); + + context = new AnnotationConfigApplicationContext(CreateNewEmployeeApplication.class); + final var fxmlLoader = context.getBean(SpringFXMLLoader.class); + primaryStage.setScene( + new Scene( + (Parent) + fxmlLoader.load( + getClass() + .getResourceAsStream( + "/fxml/createNewEmployee.fxml")))); + + // show application + primaryStage.show(); + primaryStage.toFront(); + LOG.debug("Application startup complete"); + } + + public static void main(String[] args) { + LOG.debug("Application starting with arguments={}", (Object) args); + Application.launch(MainApplication.class, args); + } + + @Override + public void stop() { + LOG.debug("Stopping application"); + context.close(); + } +} diff --git a/src/test/java/at/ac/tuwien/sepm/assignment/groupphase/employee/CreateNewEmployeeApplicationTest.java b/src/test/java/at/ac/tuwien/sepm/assignment/groupphase/employee/CreateNewEmployeeApplicationTest.java deleted file mode 100644 index b7129e2..0000000 --- a/src/test/java/at/ac/tuwien/sepm/assignment/groupphase/employee/CreateNewEmployeeApplicationTest.java +++ /dev/null @@ -1,59 +0,0 @@ -package at.ac.tuwien.sepm.assignment.groupphase.employee; - -import at.ac.tuwien.sepm.assignment.groupphase.application.MainApplication; -import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.util.SpringFXMLLoader; -import java.lang.invoke.MethodHandles; -import javafx.application.Application; -import javafx.scene.Parent; -import javafx.scene.Scene; -import javafx.stage.Stage; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.context.annotation.AnnotationConfigApplicationContext; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.stereotype.Component; - -@Component -@ComponentScan("at.ac.tuwien.sepm.assignment.groupphase") -public final class CreateNewEmployeeApplicationTest extends Application { - - private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - public static AnnotationConfigApplicationContext context; - - @Override - public void start(Stage primaryStage) throws Exception { - // setup application - primaryStage.setTitle("Person anlegen"); - primaryStage.setWidth(1366); - primaryStage.setHeight(768); - primaryStage.centerOnScreen(); - primaryStage.setOnCloseRequest(event -> LOG.debug("Application shutdown initiated")); - - context = new AnnotationConfigApplicationContext(CreateNewEmployeeApplicationTest.class); - final var fxmlLoader = context.getBean(SpringFXMLLoader.class); - primaryStage.setScene( - new Scene( - (Parent) - fxmlLoader.load( - getClass() - .getResourceAsStream( - "/fxml/createNewEmployee.fxml")))); - - // show application - primaryStage.show(); - primaryStage.toFront(); - LOG.debug("Application startup complete"); - } - - public static void main(String[] args) { - LOG.debug("Application starting with arguments={}", (Object) args); - Application.launch(MainApplication.class, args); - } - - @Override - public void stop() { - LOG.debug("Stopping application"); - context.close(); - } -} -- cgit v1.2.3-70-g09d2