package jmri.jmrit.beantable.signalmast; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import jmri.util.JUnitUtil; import java.util.*; import org.junit.jupiter.api.*; /** * Tests the overall operation of {@link SignalMastAddPane} services. *
* See {@link AbstractSignalMastAddPaneTestBase} for the base-class of the
* tests of individual implementations of {@link SignalMastAddPane} subclasses.
* of
* @author Bob Jacobsen Copyright 2018
*/
public class SignalMastAddPaneTest {
@Test
public void testLoad() {
// group these in a single test, as the services can only be loaded once.
assertNotNull(SignalMastAddPane.SignalMastAddPaneProvider.getInstancesCollection());
assertNotNull(SignalMastAddPane.SignalMastAddPaneProvider.getInstancesMap());
assertFalse(SignalMastAddPane.SignalMastAddPaneProvider.getInstancesMap().isEmpty()); // found at least one service
assertEquals(SignalMastAddPane.SignalMastAddPaneProvider.getInstancesMap().size(), SignalMastAddPane.SignalMastAddPaneProvider.getInstancesCollection().size()); // same size
// check map is in sorted order; also check lookup works
Map