45 lines
1.2 KiB
Java
45 lines
1.2 KiB
Java
package jmri.jmrix.ecos;
|
|
|
|
import java.awt.GraphicsEnvironment;
|
|
|
|
import jmri.util.JUnitUtil;
|
|
|
|
import org.junit.Assert;
|
|
import org.junit.jupiter.api.*;
|
|
import org.junit.Assume;
|
|
|
|
/**
|
|
* Tests for the EcosPreferences class
|
|
*
|
|
* @author Paul Bender Copyright (C) 2016
|
|
*/
|
|
public class EcosPreferencesTest {
|
|
|
|
EcosSystemConnectionMemo memo = null;
|
|
|
|
@Test
|
|
public void testCtor() {
|
|
// the constructor builds a PreferencesPane, which is a GUI object.
|
|
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
|
|
Assert.assertNotNull("exists", new jmri.jmrix.ecos.EcosPreferences(memo));
|
|
}
|
|
|
|
@BeforeEach
|
|
public void setUp() {
|
|
JUnitUtil.setUp();
|
|
JUnitUtil.resetProfileManager();
|
|
JUnitUtil.initRosterConfigManager();
|
|
JUnitUtil.initDefaultUserMessagePreferences();
|
|
memo = new jmri.jmrix.ecos.EcosSystemConnectionMemo();
|
|
|
|
jmri.InstanceManager.store(memo, jmri.jmrix.ecos.EcosSystemConnectionMemo.class);
|
|
}
|
|
|
|
@AfterEach
|
|
public void tearDown() {
|
|
JUnitUtil.clearShutDownManager(); // put in place because AbstractMRTrafficController implementing subclass was not terminated properly
|
|
JUnitUtil.tearDown();
|
|
}
|
|
|
|
}
|