From a96bf57e16a6995ba52426cb2a2af262b1abb907 Mon Sep 17 00:00:00 2001 From: fdai7382 Date: Tue, 31 Jan 2023 12:09:27 +0100 Subject: [PATCH] [MouseGameTest Class]: Test: "fontTahomaPruefen" erstellt. --- .../gruppenprojekt/JavaGamelauncher/MouseGame.java | 5 +++++ .../JavaGamelauncher/MouseGameTest.java | 12 ++++++++++++ 2 files changed, 17 insertions(+) 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 75e45e6..5cfc86e 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 @@ -145,6 +145,11 @@ public class MouseGame extends JFrame { } + public Font getFontTahoma() { + return fontTahoma; + } + + public int getResetX() { return resetX; } 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 7befbb2..f8b4aa5 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 @@ -4,6 +4,7 @@ import static org.junit.Assert.*; import java.awt.AWTException; import java.awt.Color; +import java.awt.Font; import java.awt.MouseInfo; import java.awt.Point; import java.awt.PointerInfo; @@ -114,4 +115,15 @@ public class MouseGameTest { assertEquals(farbeSchwarz, mg.getContentPane().getForeground()); } + + @Test + public void fontTahomaPruefen() throws AWTException { + //Given + MouseGame mg = new MouseGame(); + Font fontTahoma = new Font("Tahoma", Font.BOLD, 30); + + + //Then + assertEquals(fontTahoma, mg.getFontTahoma()); + } }