use of com.zsmartsystems.zigbee.zdo.command.BindResponse in project com.zsmartsystems.zigbee by zsmartsystems.
the class ZdoResponseMatcherTest method testMatch.
@Test
public void testMatch() {
ZdoTransactionMatcher matcher = new ZdoTransactionMatcher();
ZdoRequest zdoCommand = new BindRequest();
BindResponse zdoResponse = new BindResponse();
zdoCommand.setDestinationAddress(new ZigBeeEndpointAddress(1234));
zdoResponse.setSourceAddress(new ZigBeeEndpointAddress(1234));
assertTrue(matcher.isTransactionMatch(zdoCommand, zdoResponse));
zdoResponse.setSourceAddress(new ZigBeeEndpointAddress(5678));
assertFalse(matcher.isTransactionMatch(zdoCommand, zdoResponse));
ZclCommand zclResponse = new OffCommand();
assertFalse(matcher.isTransactionMatch(zdoCommand, zclResponse));
}
Aggregations