Search in sources :

Example 6 with ModbusTCPSlaveEndpoint

use of org.openhab.binding.modbus.internal.pooling.ModbusTCPSlaveEndpoint in project openhab1-addons by openhab.

the class ModbusSlaveEndpointTestCase method testEqualsDifferentTCPHost.

@Test
public void testEqualsDifferentTCPHost() {
    ModbusTCPSlaveEndpoint e1 = new ModbusTCPSlaveEndpoint("127.0.0.1", 500);
    ModbusTCPSlaveEndpoint e2 = new ModbusTCPSlaveEndpoint("127.0.0.2", 501);
    Assert.assertNotEquals(e1, e2);
    Assert.assertNotEquals(e1.hashCode(), e2.hashCode());
}
Also used : ModbusTCPSlaveEndpoint(org.openhab.binding.modbus.internal.pooling.ModbusTCPSlaveEndpoint) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 ModbusTCPSlaveEndpoint (org.openhab.binding.modbus.internal.pooling.ModbusTCPSlaveEndpoint)6 ModbusSlaveConnection (net.wimpi.modbus.net.ModbusSlaveConnection)1 SerialParameters (net.wimpi.modbus.util.SerialParameters)1 ModbusSerialSlaveEndpoint (org.openhab.binding.modbus.internal.pooling.ModbusSerialSlaveEndpoint)1 ModbusSlaveEndpoint (org.openhab.binding.modbus.internal.pooling.ModbusSlaveEndpoint)1 ModbusUDPSlaveEndpoint (org.openhab.binding.modbus.internal.pooling.ModbusUDPSlaveEndpoint)1 BindingConfigParseException (org.openhab.model.item.binding.BindingConfigParseException)1