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

44 lines
1.2 KiB
Java

package jmri.jmrit.logix;
import java.io.File;
import java.io.IOException;
import jmri.util.JUnitUtil;
import org.junit.jupiter.api.*;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.junit.jupiter.api.io.TempDir;
/**
*
* @author Pete Cressman Copyright (C) 2020
*/
@DisabledIfSystemProperty(named ="java.awt.headless", matches ="true")
public class LearnFunctionPanelTest {
@Test
public void testCTor() {
WarrantFrame wf = new WarrantFrame(new Warrant("IW0", "AllTestWarrant"));
LearnThrottleFrame ltf = new LearnThrottleFrame(wf);
LearnFunctionPanel t = new LearnFunctionPanel(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.initRosterConfigManager();
JUnitUtil.initDebugThrottleManager();
}
@AfterEach
public void tearDown() {
JUnitUtil.clearShutDownManager();
JUnitUtil.tearDown();
}
}