diff --git a/app/src/main/java/ch/zhaw/projekt2/turnierverwaltung/Factory.java b/app/src/main/java/ch/zhaw/projekt2/turnierverwaltung/Factory.java index b3b22f1..29e644c 100644 --- a/app/src/main/java/ch/zhaw/projekt2/turnierverwaltung/Factory.java +++ b/app/src/main/java/ch/zhaw/projekt2/turnierverwaltung/Factory.java @@ -117,8 +117,6 @@ public class Factory { innerVbox.getChildren().add(label); } - - } public void resetFooter(BorderPane pane,boolean error) { diff --git a/app/src/test/java/ch/zhaw/projekt2/turnierverwaltung/FactoryTest.java b/app/src/test/java/ch/zhaw/projekt2/turnierverwaltung/FactoryTest.java new file mode 100644 index 0000000..c3b9763 --- /dev/null +++ b/app/src/test/java/ch/zhaw/projekt2/turnierverwaltung/FactoryTest.java @@ -0,0 +1,28 @@ +package ch.zhaw.projekt2.turnierverwaltung; + +import javafx.scene.layout.BorderPane; +import javafx.scene.layout.Pane; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.mockito.InOrder; +import org.mockito.Mockito; + +import static org.mockito.Mockito.inOrder; + +public class FactoryTest { + private Factory factory; + + @Test + @DisplayName("Test method calls") + void checkMethodCalls() { + FileIO fileIO = Mockito.mock(FileIO.class); + TournamentDecorator td = Mockito.mock(TournamentDecorator.class); + LanguageConfigurator lc = Mockito.mock(LanguageConfigurator.class); + BorderPane pane = Mockito.mock(BorderPane.class); + factory = new Factory(fileIO,td,lc); + InOrder order = inOrder(fileIO,td,lc); + + factory.showTournamentList(pane); + + } +}