From adf1c0bf4ed42839001e564ea97154a1fd216df7 Mon Sep 17 00:00:00 2001 From: fdai7382 Date: Fri, 27 Jan 2023 23:05:00 +0100 Subject: [PATCH] [MouseGameTest Class]: Test: "titelUeberpruefen" erstellt --- .../gruppenprojekt/JavaGamelauncher/MouseGame.java | 3 ++- .../JavaGamelauncher/MouseGameTest.java | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java b/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java index 427aa3a..8b6d6fd 100644 --- a/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java +++ b/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java @@ -43,7 +43,7 @@ public class MouseGame extends JFrame { public MouseGame() throws AWTException { //Fensterrahmen Haupt Layout - setTitle("Maze Game"); + setTitle("Mouse Game"); setBounds(100, 100, 900, 650); robot.mouseMove(200, 170); @@ -131,4 +131,5 @@ public class MouseGame extends JFrame { } }); } + }//end class diff --git a/JavaGamelauncher/src/test/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGameTest.java b/JavaGamelauncher/src/test/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGameTest.java index 400ec5f..759c21d 100644 --- a/JavaGamelauncher/src/test/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGameTest.java +++ b/JavaGamelauncher/src/test/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGameTest.java @@ -28,5 +28,14 @@ public class MouseGameTest { //Then assertTrue(true); } - + + @Test + public void titelUeberpruefen() throws AWTException { + //Given + MouseGame mg = new MouseGame(); + + //Then + assertTrue(mg.getTitle()=="Mouse Game"); + } + }