Skip to content

Commit 5700d2b

Browse files
matthijskooijmancmaglie
authored andcommitted
AbstractGUITest: Make a subclass of AbstractWithPreferencesTest
Both classes contained some duplicate code, so unify that by making one a subclass of the other. This also prepares for further additions that should be inherited by both.
1 parent 2bd7be0 commit 5700d2b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

app/test/processing/app/AbstractGUITest.java

+4-8
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,21 @@
4141
import javax.swing.*;
4242
import java.util.Random;
4343

44-
public abstract class AbstractGUITest {
44+
public abstract class AbstractGUITest extends AbstractWithPreferencesTest {
4545

4646
protected ArduinoFrameFixture window;
4747

4848
@Before
4949
public void startUpTheIDE() throws Exception {
50+
// This relies on AbstractWithPreferencesTest to set up the
51+
// non-gui-specific stuff.
52+
5053
System.setProperty("mrj.version", "whynot"); //makes sense only on osx. See https://github.com/alexruiz/fest-swing-1.x/issues/2#issuecomment-86532042
51-
Runtime.getRuntime().addShutdownHook(new Thread(DeleteFilesOnShutdown.INSTANCE));
5254

5355
FailOnThreadViolationRepaintManager.install();
5456

55-
BaseNoGui.initPlatform();
56-
BaseNoGui.getPlatform().init();
57-
PreferencesData.init(null);
5857
JPopupMenu.setDefaultLightWeightPopupEnabled(false);
59-
Theme.init();
6058
BaseNoGui.getPlatform().setLookAndFeel();
61-
Base.untitledFolder = FileUtils.createTempFolder("untitled" + new Random().nextInt(Integer.MAX_VALUE), ".tmp");
62-
DeleteFilesOnShutdown.add(Base.untitledFolder);
6359

6460
window = GuiActionRunner.execute(new GuiQuery<ArduinoFrameFixture>() {
6561
@Override

0 commit comments

Comments
 (0)