@Test public void testToString() { StateSensor.DistinctStates states = new StateSensor.DistinctStates(); states.addState("foo"); StateSensor s1 = new StateSensor("single", 1, cache, new StateReadCommand("foo"), 1, states); Assert.assertTrue(s1.toString().contains("single")); Assert.assertTrue(s1.toString().contains("foo")); states = new StateSensor.DistinctStates(); states.addState("foo"); states.addState("bar"); s1 = new StateSensor("twostate", 2, cache, new StateReadCommand("foo", "bar"), 1, states); Assert.assertTrue(s1.toString().contains("twostate")); Assert.assertTrue(s1.toString().contains("foo")); Assert.assertTrue(s1.toString().contains("bar")); }
@Override public String toString() { return "Sensor (Name = '" + getName() + "', ID = '" + getSensorID() + "', State Mappings: " + states.toString() + ")"; }
StateSensor extends Sensor { @Override public String toString() { return "Sensor (Name = '" + getName() + "', ID = '" + getSensorID() + "', State Mappings: " + states.toString() + ")"; } }
StateSensor extends Sensor { @Override public String toString() { return "Sensor (Name = '" + getName() + "', ID = '" + getSensorID() + "', State Mappings: " + states.toString() + ")"; } StateSensor(String name, int sensorID, StatusCache cache, EventProducer producer, int commandID, DistinctStates states); protected  StateSensor(String name, int sensorID, StatusCache cache, EnumSensorType type, EventProducer producer,
                        int commandID, DistinctStates states, boolean includeStatesAsProperties); }
StateSensor extends Sensor { @Override public String toString() { return "Sensor (Name = '" + getName() + "', ID = '" + getSensorID() + "', State Mappings: " + states.toString() + ")"; } StateSensor(String name, int sensorID, StatusCache cache, EventProducer producer, int commandID, DistinctStates states); protected  StateSensor(String name, int sensorID, StatusCache cache, EnumSensorType type, EventProducer producer,
                        int commandID, DistinctStates states, boolean includeStatesAsProperties); @Override Event processEvent(String value); void setStrictStateMapping(boolean strictStateMapping); @Override String toString(); }
StateSensor extends Sensor { @Override public String toString() { return "Sensor (Name = '" + getName() + "', ID = '" + getSensorID() + "', State Mappings: " + states.toString() + ")"; } StateSensor(String name, int sensorID, StatusCache cache, EventProducer producer, int commandID, DistinctStates states); protected  StateSensor(String name, int sensorID, StatusCache cache, EnumSensorType type, EventProducer producer,
                        int commandID, DistinctStates states, boolean includeStatesAsProperties); @Override Event processEvent(String value); void setStrictStateMapping(boolean strictStateMapping); @Override String toString(); final static boolean DEFAULT_STRICT_STATE_MAPPING; }