Files
2026-06-17 14:00:51 +02:00

41 lines
1.2 KiB
Java

package jmri.jmrit.logix;
import jmri.util.JUnitAppender;
import jmri.util.JUnitUtil;
import org.junit.jupiter.api.*;
/**
*
* @author Paul Bender Copyright (C) 2017
*/
public class EngineerTest {
@Test
public void testCTor() {
Warrant warrant = new Warrant("IW0", "AllTestWarrant");
warrant.addThrottleCommand(new ThrottleSetting());
jmri.DccLocoAddress addr = new jmri.DccLocoAddress(5,false);
jmri.SystemConnectionMemo memo = new jmri.jmrix.internal.InternalSystemConnectionMemo();
jmri.DccThrottle throttle = new jmri.jmrix.debugthrottle.DebugThrottle(addr,memo);
Engineer t = new Engineer(warrant, throttle);
Assertions.assertNotNull( t, "exists");
t.stopRun(true, true);
JUnitAppender.assertErrorMessageStartsWith("AllTestWarrant releaseThrottle. Throttle Manager unavailable or cannot provide throttle. 5(S)");
warrant.stopWarrant(true, true);
}
@BeforeEach
public void setUp() {
JUnitUtil.setUp();
}
@AfterEach
public void tearDown() {
JUnitUtil.tearDown();
}
// private static final Logger log = LoggerFactory.getLogger(EngineerTest.class);
}