|
|
@ -9,8 +9,13 @@ import java.io.IOException; |
|
|
|
import org.junit.jupiter.api.BeforeEach; |
|
|
|
import org.junit.jupiter.api.Test; |
|
|
|
|
|
|
|
import Gui.GameGui; |
|
|
|
import Gui.gui; |
|
|
|
|
|
|
|
class runGameTest { |
|
|
|
|
|
|
|
GameGui game = new GameGui(); |
|
|
|
gui Gui = new gui(); |
|
|
|
@BeforeEach |
|
|
|
void setUp() throws Exception { |
|
|
|
} |
|
|
@ -60,4 +65,20 @@ class runGameTest { |
|
|
|
assertEquals("4", parts[3]); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
public void testRun() { |
|
|
|
//arrange |
|
|
|
Gui.StartMainMenu(); |
|
|
|
game.createGui(); |
|
|
|
gui.Frame.setVisible(false); |
|
|
|
//act |
|
|
|
runGame.arrQuestions = new String[]{"Frage 1", "Frage 2"}; |
|
|
|
runGame.arrAnswers = new String[]{"Antw. 1,Antw. 2,Antw. 3,Antw. 4", |
|
|
|
"Antw. 5,Antw. 6,Antw. 7,Antw. 8"}; |
|
|
|
runGame game = new runGame(); |
|
|
|
game.run(0); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |