Files
JIMRI/java/test/jmri/jmrit/logix/LearnControlPanelTest.java
2026-06-17 14:00:51 +02:00

46 lines
1.1 KiB
Java

package jmri.jmrit.logix;
import java.io.File;
import java.io.IOException;
import jmri.util.JUnitUtil;
import jmri.util.junit.annotations.DisabledIfHeadless;
import org.junit.jupiter.api.*;
import org.junit.jupiter.api.io.TempDir;
/**
*
* @author Pete Cressman Copyright (C) 2020
*/
@DisabledIfHeadless
public class LearnControlPanelTest {
@Test
public void testCTor() {
WarrantFrame wf = new WarrantFrame(new Warrant("IW0", "AllTestWarrant"));
LearnThrottleFrame ltf = new LearnThrottleFrame(wf);
LearnControlPanel t = new LearnControlPanel(ltf);
Assertions.assertNotNull( t, "exists");
JUnitUtil.dispose(ltf);
JUnitUtil.dispose(wf);
}
@BeforeEach
public void setUp(@TempDir File tempDir) throws IOException {
JUnitUtil.setUp();
JUnitUtil.resetProfileManager(new jmri.profile.NullProfile(tempDir));
JUnitUtil.initConfigureManager();
JUnitUtil.initRosterConfigManager();
JUnitUtil.initDebugThrottleManager();
}
@AfterEach
public void tearDown() {
JUnitUtil.clearShutDownManager();
JUnitUtil.tearDown();
}
}