43 lines
1.2 KiB
Java
43 lines
1.2 KiB
Java
package jmri.jmrix.powerline.swing.packetgen;
|
|
|
|
import java.awt.GraphicsEnvironment;
|
|
|
|
import jmri.jmrix.powerline.SerialTrafficControlScaffold;
|
|
import jmri.util.JUnitUtil;
|
|
|
|
import org.junit.Assert;
|
|
import org.junit.jupiter.api.*;
|
|
import org.junit.Assume;
|
|
|
|
/**
|
|
* Test simple functioning of SerialPacketGenAction
|
|
*
|
|
* @author Paul Bender Copyright (C) 2016
|
|
*/
|
|
public class SerialPacketGenActionTest {
|
|
|
|
@Test
|
|
public void testStringMemoCtor() {
|
|
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
|
|
SerialPacketGenAction action = new SerialPacketGenAction("PowerLine test Action", new SerialTrafficControlScaffold());
|
|
Assert.assertNotNull("exists", action);
|
|
}
|
|
|
|
@Test
|
|
public void testTCCtor() {
|
|
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
|
|
SerialPacketGenAction action = new SerialPacketGenAction( new SerialTrafficControlScaffold());
|
|
Assert.assertNotNull("exists", action);
|
|
}
|
|
|
|
@BeforeEach
|
|
public void setUp() {
|
|
JUnitUtil.setUp();
|
|
}
|
|
|
|
@AfterEach
|
|
public void tearDown() { JUnitUtil.clearShutDownManager(); // put in place because AbstractMRTrafficController implementing subclass was not terminated properly
|
|
JUnitUtil.tearDown();
|
|
}
|
|
}
|