Skip to content

Commit bacf9aa

Browse files
author
Krzysztof Majewski
committed
rename
1 parent 3dfc1ac commit bacf9aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core-java-modules/core-java-os/src/test/java/com/baeldung/screenshot/ScreenshotTest.java renamed to core-java-modules/core-java-os/src/test/java/com/baeldung/screenshot/ScreenshotUnitTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
import static org.junit.Assert.assertTrue;
1313

14-
public class ScreenshotTest {
14+
public class ScreenshotUnitTest {
1515

1616
@Test
17-
public void takeScreenshotOfMainScreen() throws Exception {
17+
public void givenMainScreen_whenTakeScreenshot_thenSaveToFile() throws Exception {
1818
Rectangle screenRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize());
1919
BufferedImage capture = new Robot().createScreenCapture(screenRect);
2020
File imageFile = File.createTempFile("single-screen", "bmp");
@@ -23,7 +23,7 @@ public void takeScreenshotOfMainScreen() throws Exception {
2323
}
2424

2525
@Test
26-
public void takeScreenshotOfAllScreens() throws Exception {
26+
public void givenMultipleScreens_whenTakeScreenshot_thenSaveToFile() throws Exception {
2727
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
2828
GraphicsDevice[] screens = ge.getScreenDevices();
2929
Rectangle allScreenBounds = new Rectangle();
@@ -39,7 +39,7 @@ public void takeScreenshotOfAllScreens() throws Exception {
3939
}
4040

4141
@Test
42-
public void makeScreenshot(Component component) throws Exception {
42+
public void givenComponent_whenTakeScreenshot_thenSaveToFile(Component component) throws Exception {
4343
Rectangle componentRect = component.getBounds();
4444
BufferedImage bufferedImage = new BufferedImage(componentRect.width, componentRect.height, BufferedImage.TYPE_INT_ARGB);
4545
component.paint(bufferedImage.getGraphics());

0 commit comments

Comments
 (0)