Skip to content
Permalink
Browse files

Fix headless issues

  • Loading branch information...
dsand47 committed Oct 16, 2018
1 parent f700d0c commit e0ca72f6e87f78f146b9e3af69b4606cbda50336
@@ -1,5 +1,6 @@
package jmri.jmrit.timetable;

import java.awt.GraphicsEnvironment;
import jmri.jmrit.timetable.swing.*;
import jmri.util.JUnitUtil;
import org.junit.*;
@@ -41,6 +42,7 @@ public void testSettersAndGetters() {

@Test
public void testToString() {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
TimeTableFrame f = new TimeTableFrame("");
TimeTableDataManager dm = f.getDataManager();
Station station = new Station(1, 1);
@@ -1,5 +1,6 @@
package jmri.jmrit.timetable.configurexml;

import java.awt.GraphicsEnvironment;
import org.junit.*;
import jmri.jmrit.timetable.*;
import jmri.jmrit.timetable.swing.*;
@@ -18,7 +19,9 @@ public void testCreate() {

@Test
public void testLoadAndStore() {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
TimeTableFrame f = new TimeTableFrame("");
Assert.assertNotNull(f);
boolean loadResult = TimeTableXml.doLoad();
Assert.assertTrue("Load Failed", loadResult); // NOI18N
boolean storeResult = TimeTableXml.doStore();
@@ -157,6 +157,7 @@ public static void setUp() {
JUnitUtil.resetInstanceManager();
JUnitUtil.resetProfileManager();

Assume.assumeFalse(GraphicsEnvironment.isHeadless());
ttf = new TimeTableFrame("");
ttf.setVisible(true);
}
@@ -166,5 +167,4 @@ public static void tearDown() {
ttf = null;
jmri.util.JUnitUtil.tearDown();
}
private final static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(TimeTableFrameTest.class);
}

0 comments on commit e0ca72f

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