44 lines
1.2 KiB
Java
44 lines
1.2 KiB
Java
package jmri.jmrix.ecos.swing.preferences;
|
|
|
|
import java.awt.GraphicsEnvironment;
|
|
|
|
import jmri.util.JUnitUtil;
|
|
|
|
import org.junit.Assert;
|
|
import org.junit.jupiter.api.*;
|
|
import org.junit.Assume;
|
|
|
|
/**
|
|
* Test simple functioning of PreferencesFrameAction
|
|
*
|
|
* @author Paul Bender Copyright (C) 2016
|
|
*/
|
|
public class PreferencesFrameActionTest {
|
|
|
|
jmri.jmrix.ecos.EcosSystemConnectionMemo memo = null;
|
|
|
|
@Test
|
|
public void testCtor() {
|
|
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
|
|
PreferencesFrameAction action = new PreferencesFrameAction("Ecos Action Test",memo);
|
|
Assert.assertNotNull("exists", action);
|
|
}
|
|
|
|
@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();
|
|
}
|
|
}
|