summaryrefslogtreecommitdiff
path: root/SmartDeviceLinkTests/ProtocolSpecs/HeaderSpecs/SDLV1ProtocolHeaderSpec.m
diff options
context:
space:
mode:
Diffstat (limited to 'SmartDeviceLinkTests/ProtocolSpecs/HeaderSpecs/SDLV1ProtocolHeaderSpec.m')
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/HeaderSpecs/SDLV1ProtocolHeaderSpec.m17
1 files changed, 17 insertions, 0 deletions
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/HeaderSpecs/SDLV1ProtocolHeaderSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/HeaderSpecs/SDLV1ProtocolHeaderSpec.m
index a7c6c1660..d5ddb4707 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/HeaderSpecs/SDLV1ProtocolHeaderSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/HeaderSpecs/SDLV1ProtocolHeaderSpec.m
@@ -86,4 +86,21 @@ describe(@"RPCPayloadWithData Test", ^ {
});
});
+describe(@"IsEqual Tests", ^ {
+ it (@"Should be equal to copy of header", ^ {
+ // Create exact copy of test header
+ SDLV1ProtocolHeader *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
+ SDLV1ProtocolHeader *unequalHeader = [testHeader copy];
+ unequalHeader.encrypted = NO;
+
+ expect(([testHeader isEqual:unequalHeader])).to(equal(@NO));
+ });
+});
+
QuickSpecEnd