summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Gluck <justin.gluck@livio.io>2019-09-25 09:40:50 -0400
committerJustin Gluck <justin.gluck@livio.io>2019-09-25 09:40:50 -0400
commitbd2944bbc2171aa61e01c2b881bbc082ec1db0d6 (patch)
tree4feb604b9670d495b6ee2ef55c003912cab50287
parentd682c30e9becc9a0bd2dbb73fb22f80fe0af7aac (diff)
downloadsdl_ios-bd2944bbc2171aa61e01c2b881bbc082ec1db0d6.tar.gz
fixing issue with description being changed, using base64 encode version of datafeature/issue-1407-Payload-Unit-Tets-Fail
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadNakSpec.m3
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadRegisterSecondaryTransportNakSpec.m3
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadTransportEventUpdateSpec.m3
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadVideoStartServiceSpec.m3
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFrameVideoStartServiceAckSpec.m3
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadAudioStartServiceAckSpec.m3
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadEndServiceSpec.m3
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m6
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceSpec.m3
9 files changed, 20 insertions, 10 deletions
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadNakSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadNakSpec.m
index df7bd1305..282ce9bc7 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadNakSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadNakSpec.m
@@ -19,7 +19,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<3e000000 0472656a 65637465 64506172 616d7300 29000000 0230000b 00000074 65737450 6172616d 31000231 000b0000 00746573 74506172 616d3200 0000>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"PgAAAARyZWplY3RlZFBhcmFtcwApAAAAAjAACwAAAHRlc3RQYXJhbTEAAjEACwAAAHRlc3RQYXJhbTIAAAA="));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadRegisterSecondaryTransportNakSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadRegisterSecondaryTransportNakSpec.m
index e01d268f0..e8e346ac9 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadRegisterSecondaryTransportNakSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadRegisterSecondaryTransportNakSpec.m
@@ -26,7 +26,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<28000000 02726561 736f6e00 17000000 61207361 6d706c65 20726561 736f6e20 6f66204e 414b0000>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"KAAAAAJyZWFzb24AFwAAAGEgc2FtcGxlIHJlYXNvbiBvZiBOQUsAAA=="));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadTransportEventUpdateSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadTransportEventUpdateSpec.m
index e6a79fc08..c0a78c756 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadTransportEventUpdateSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadTransportEventUpdateSpec.m
@@ -29,7 +29,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<31000000 10746370 506f7274 00393000 00027463 70497041 64647265 7373000d 00000031 302e3230 2e33302e 32353400 00>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"MQAAABB0Y3BQb3J0ADkwAAACdGNwSXBBZGRyZXNzAA0AAAAxMC4yMC4zMC4yNTQAAA=="));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadVideoStartServiceSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadVideoStartServiceSpec.m
index c93d72c9b..f5ae8b52c 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadVideoStartServiceSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFramePayloadVideoStartServiceSpec.m
@@ -29,7 +29,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<49000000 02766964 656f5072 6f746f63 6f6c0005 00000052 544d5000 10776964 7468006b 01000002 76696465 6f436f64 65630005 00000048 32363500 10686569 67687400 92e90000 00>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"SQAAAAJ2aWRlb1Byb3RvY29sAAUAAABSVE1QABB3aWR0aABrAQAAAnZpZGVvQ29kZWMABQAAAEgyNjUAEGhlaWdodACS6QAAAA=="));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFrameVideoStartServiceAckSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFrameVideoStartServiceAckSpec.m
index c817f44f4..4298ec826 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFrameVideoStartServiceAckSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/ControlFramePayloadSpecs/SDLControlFrameVideoStartServiceAckSpec.m
@@ -31,7 +31,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<55000000 126d7475 00f40a13 00000000 00027669 64656f50 726f746f 636f6c00 04000000 52415700 10776964 74680024 00000002 76696465 6f436f64 65630005 00000048 32363400 10686569 67687400 56170000 00>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"VQAAABJtdHUA9AoTAAAAAAACdmlkZW9Qcm90b2NvbAAEAAAAUkFXABB3aWR0aAAkAAAAAnZpZGVvQ29kZWMABQAAAEgyNjQAEGhlaWdodABWFwAAAA=="));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadAudioStartServiceAckSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadAudioStartServiceAckSpec.m
index 548110d0d..8c66f6937 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadAudioStartServiceAckSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadAudioStartServiceAckSpec.m
@@ -21,7 +21,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<12000000 126d7475 00d3d9ab 23000000 0000>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"EgAAABJtdHUA09mrIwAAAAAA"));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadEndServiceSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadEndServiceSpec.m
index a59c95811..c814cee7d 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadEndServiceSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadEndServiceSpec.m
@@ -20,7 +20,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<11000000 10686173 68496400 fd41b008 00>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"EQAAABBoYXNoSWQA/UGwCAA="));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m
index 682d53678..63e927d5f 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m
@@ -28,7 +28,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<3b000000 10686173 68496400 193e1600 126d7475 0089515b 00000000 00027072 6f746f63 6f6c5665 7273696f 6e000800 0000312e 33322e33 320000>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"OwAAABBoYXNoSWQAGT4WABJtdHUAiVFbAAAAAAACcHJvdG9jb2xWZXJzaW9uAAgAAAAxLjMyLjMyAAA="));
});
});
@@ -45,7 +46,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<c3000000 04766964 656f5365 72766963 65547261 6e73706f 72747300 13000000 10300002 00000010 31000100 00000010 68617368 49640006 120f0012 6d747500 00100000 00000000 04736563 6f6e6461 72795472 616e7370 6f727473 00240000 00023000 09000000 5443505f 57494649 00023100 08000000 4941505f 55534200 00046175 64696f53 65727669 63655472 616e7370 6f727473 000c0000 00103000 02000000 00027072 6f746f63 6f6c5665 7273696f 6e000800 0000352e 31302e30 310000>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"wwAAAAR2aWRlb1NlcnZpY2VUcmFuc3BvcnRzABMAAAAQMAACAAAAEDEAAQAAAAAQaGFzaElkAAYSDwASbXR1AAAQAAAAAAAABHNlY29uZGFyeVRyYW5zcG9ydHMAJAAAAAIwAAkAAABUQ1BfV0lGSQACMQAIAAAASUFQX1VTQgAABGF1ZGlvU2VydmljZVRyYW5zcG9ydHMADAAAABAwAAIAAAAAAnByb3RvY29sVmVyc2lvbgAIAAAANS4xMC4wMQAA"));
});
});
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceSpec.m
index f39204330..b021c4057 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceSpec.m
@@ -21,7 +21,8 @@ describe(@"Test encoding data", ^{
});
it(@"should create the correct data", ^{
- expect(testPayload.data.description).to(equal(@"<22000000 0270726f 746f636f 6c566572 73696f6e 00080000 0037342e 33322e32 0000>"));
+ NSString *base64Encoded = [testPayload.data base64EncodedStringWithOptions:0];
+ expect(base64Encoded).to(equal(@"IgAAAAJwcm90b2NvbFZlcnNpb24ACAAAADc0LjMyLjIAAA=="));
});
});