Browse Source

[MouseGameTest Class]: Test: "fontTahomaPruefen" erstellt.

remotes/origin/MouseGame
fdai7382 2 years ago
parent
commit
a96bf57e16
  1. 5
      JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java
  2. 12
      JavaGamelauncher/src/test/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGameTest.java

5
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() { public int getResetX() {
return resetX; return resetX;
} }

12
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.AWTException;
import java.awt.Color; import java.awt.Color;
import java.awt.Font;
import java.awt.MouseInfo; import java.awt.MouseInfo;
import java.awt.Point; import java.awt.Point;
import java.awt.PointerInfo; import java.awt.PointerInfo;
@ -114,4 +115,15 @@ public class MouseGameTest {
assertEquals(farbeSchwarz, mg.getContentPane().getForeground()); 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());
}
} }
Loading…
Cancel
Save