// DCCppSensor test for setting state public void testDCCppSensorSetState() throws jmri.JmriException { DCCppInterfaceScaffold xnis = new DCCppInterfaceScaffold(new DCCppCommandStation()); DCCppSensor t = new DCCppSensor("DCCPPS043", xnis); t.setKnownState(jmri.Sensor.ACTIVE); Assert.assertTrue(t.getKnownState() == jmri.Sensor.ACTIVE); t.setKnownState(jmri.Sensor.INACTIVE); Assert.assertTrue(t.getKnownState() == jmri.Sensor.INACTIVE); }