From 9d614f39e286362c8928599119ab10b9b8e17ce9 Mon Sep 17 00:00:00 2001 From: MetaPrime Date: Mon, 6 Jan 2025 00:52:25 -0800 Subject: [PATCH] RipButtonHandlerTest.java - clean up imports and fix linter warnings --- .../ripme/ui/RipButtonHandlerTest.java | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/test/java/com/rarchives/ripme/ui/RipButtonHandlerTest.java b/src/test/java/com/rarchives/ripme/ui/RipButtonHandlerTest.java index 9c8f9640..e3d7c15e 100644 --- a/src/test/java/com/rarchives/ripme/ui/RipButtonHandlerTest.java +++ b/src/test/java/com/rarchives/ripme/ui/RipButtonHandlerTest.java @@ -1,18 +1,15 @@ package com.rarchives.ripme.ui; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.io.IOException; + +import javax.swing.SwingUtilities; + import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; -import javax.swing.*; -import java.awt.event.ActionEvent; -import java.io.IOException; -import java.util.Collections; - -import static org.junit.jupiter.api.Assertions.*; - public class RipButtonHandlerTest { - - @Test @Tag("flaky") public void duplicateUrlTestCase() throws IOException { @@ -21,17 +18,17 @@ public class RipButtonHandlerTest { SwingUtilities.invokeLater(testMainWindow); MainWindow.RipButtonHandler rbHandler = new MainWindow.RipButtonHandler(testMainWindow); - // Creating a RipButtonHandler instance - Changing fake text to cause github to rebuild 1. + // Creating a RipButtonHandler instance - Changing fake text to cause github to + // rebuild 1. // Add some URL to the model (assuming there's a method for adding URLs) - testMainWindow.getRipTextfield().setText("http://example.com"); + MainWindow.getRipTextfield().setText("http://example.com"); rbHandler.actionPerformed(null); - testMainWindow.getRipTextfield().setText("http://example.com"); + MainWindow.getRipTextfield().setText("http://example.com"); rbHandler.actionPerformed(null); // Assuming your MainWindow or RipButtonHandler sets some flag or state // indicating that a duplicate URL was encountered - assertEquals(testMainWindow.getRipTextfield().getText(), ""); + assertEquals(MainWindow.getRipTextfield().getText(), ""); } - -} \ No newline at end of file +}