Setup Platform for runLater in GardenSchedule
Otherwise Test planTaskForCrop crashes due to unitialized Platform
This commit is contained in:
parent
5830ee5180
commit
56020a7529
|
@ -3,6 +3,9 @@ package ch.zhaw.gartenverwaltung.models;
|
||||||
import ch.zhaw.gartenverwaltung.io.*;
|
import ch.zhaw.gartenverwaltung.io.*;
|
||||||
import ch.zhaw.gartenverwaltung.models.GardenSchedule;
|
import ch.zhaw.gartenverwaltung.models.GardenSchedule;
|
||||||
import ch.zhaw.gartenverwaltung.types.*;
|
import ch.zhaw.gartenverwaltung.types.*;
|
||||||
|
import javafx.application.Platform;
|
||||||
|
import org.junit.jupiter.api.AfterAll;
|
||||||
|
import org.junit.jupiter.api.BeforeAll;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
@ -29,6 +32,16 @@ class GardenScheduleTest {
|
||||||
List<TaskTemplate> exampleTaskTemplateList;
|
List<TaskTemplate> exampleTaskTemplateList;
|
||||||
GardenSchedule model;
|
GardenSchedule model;
|
||||||
|
|
||||||
|
@BeforeAll
|
||||||
|
static void setUpAll() {
|
||||||
|
Platform.startup(()->{});
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterAll
|
||||||
|
static void tearDownAll() {
|
||||||
|
Platform.exit();
|
||||||
|
}
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setUp() throws IOException, HardinessZoneNotSetException {
|
void setUp() throws IOException, HardinessZoneNotSetException {
|
||||||
createExampleTaskList();
|
createExampleTaskList();
|
||||||
|
|
Loading…
Reference in New Issue