Skip to content
Permalink
Browse files

quick test of Throttle Saving.

  • Loading branch information...
pabender committed Oct 30, 2018
1 parent 4bd69ef commit 2a25c32df87888379abc9bf668ddbc0bcba0d1f3
Showing with 13 additions and 6 deletions.
  1. +13 −6 java/test/jmri/jmrit/throttle/ThrottleFrameTest.java
@@ -299,19 +299,26 @@ public void testSpinnerMinimumSpeed() {
to.pushReleaseButton();
}

@Test
public void testSaveThrottle() {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
// right now, just verify no error
panel.saveThrottle();
}

@Before
public void setUp() {
JUnitUtil.setUp();
JUnitUtil.resetProfileManager();
JUnitUtil.initDebugThrottleManager();

if(!GraphicsEnvironment.isHeadless()){
if(!GraphicsEnvironment.isHeadless()){
frame = new ThrottleWindow();
panel = new ThrottleFrame(frame);
frame.setExtendedState( frame.getExtendedState()|java.awt.Frame.MAXIMIZED_BOTH );
panel.toFront();
panel.toFront();
to = new ThrottleOperator(Bundle.getMessage("ThrottleTitle"));
}
}
}

@After
@@ -325,8 +332,8 @@ public void tearDown() {
JUnitUtil.disposeFrame(Bundle.getMessage("ThrottleListFrameTile"), true, true);
}
panel = null;
frame = null;
to = null;
JUnitUtil.tearDown();
frame = null;
to = null;
JUnitUtil.tearDown();
}
}

0 comments on commit 2a25c32

Please sign in to comment.
You can’t perform that action at this time.