Skip to content

Commit

Permalink
remove unused imports, function & did some formatting in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada committed Nov 16, 2024
1 parent 9fcc422 commit d54e418
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
2 changes: 0 additions & 2 deletions src/main/java/com/questhelper/steps/WidgetStep.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
import java.util.Arrays;
import java.util.List;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import lombok.Setter;
import net.runelite.api.widgets.Widget;
import com.questhelper.QuestHelperPlugin;
Expand Down
17 changes: 1 addition & 16 deletions src/test/java/com/questhelper/MockedTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,8 @@
import org.junit.jupiter.api.BeforeEach;
import org.mockito.Mockito;
import javax.inject.Named;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.util.Random;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadLocalRandom;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when;

/**
Expand Down Expand Up @@ -113,17 +109,6 @@ public abstract class MockedTest extends MockedTestBase
@Bind
@Named("developerMode")
private boolean developerMode;

public BufferedImage random(final int width, final int height) {
Random rand = ThreadLocalRandom.current();
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
image.setRGB(x, y, new Color(rand.nextFloat(), rand.nextFloat(), rand.nextFloat()).getRGB());
}
}
return image;
}


@Override
Expand All @@ -134,7 +119,7 @@ protected void setUp()

when(questHelperPlugin.getPlayerStateManager()).thenReturn(playerStateManager);
when(playerStateManager.getAccountType()).thenReturn(AccountType.NORMAL);
when(client.getIntStack()).thenReturn(new int[] { 1, 1, 1, 1 });
when(client.getIntStack()).thenReturn(new int[] {1, 1, 1, 1});
when(questHelperConfig.solvePuzzles()).thenReturn(true);
when(spriteManager.getSprite(SpriteID.TAB_QUESTS, 0)).thenReturn(new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB));

Expand Down

0 comments on commit d54e418

Please sign in to comment.