diff options
Diffstat (limited to 'SmartDeviceLinkTests/ProtocolSpecs/HeaderSpecs/SDLV2ProtocolHeaderSpec.m')
-rw-r--r-- | SmartDeviceLinkTests/ProtocolSpecs/HeaderSpecs/SDLV2ProtocolHeaderSpec.m | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/HeaderSpecs/SDLV2ProtocolHeaderSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/HeaderSpecs/SDLV2ProtocolHeaderSpec.m index 1ade6e426..8c1de8a56 100644 --- a/SmartDeviceLinkTests/ProtocolSpecs/HeaderSpecs/SDLV2ProtocolHeaderSpec.m +++ b/SmartDeviceLinkTests/ProtocolSpecs/HeaderSpecs/SDLV2ProtocolHeaderSpec.m @@ -90,4 +90,21 @@ describe(@"RPCPayloadWithData Test", ^ { }); }); +describe(@"IsEqual Tests", ^ { + it (@"Should be equal to copy of header", ^ { + // Create exact copy of test header + SDLV2ProtocolHeader *equalHeader = [testHeader copy]; + + expect([testHeader isEqual:equalHeader]).to(equal(@YES)); + }); + + it (@"Should not be equal to a different header", ^ { + // Create a slighty different version of test header + SDLV2ProtocolHeader *unequalHeader = [testHeader copy]; + unequalHeader.messageID = 0x6DAB424E; + + expect(([testHeader isEqual:unequalHeader])).to(equal(@NO)); + }); +}); + QuickSpecEnd |