summaryrefslogtreecommitdiff
path: root/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m
diff options
context:
space:
mode:
Diffstat (limited to 'SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m')
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m26
1 files changed, 17 insertions, 9 deletions
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m
index 8a198c63e..682d53678 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/SDLControlFramePayloadRPCStartServiceAckSpec.m
@@ -18,13 +18,13 @@ describe(@"Test encoding data", ^{
__block NSArray<NSNumber *> *testAudioServiceTransports = nil;
__block NSArray<NSNumber *> *testVideoServiceTransports = nil;
- context(@"with paramaters", ^{
+ context(@"with parameters", ^{
beforeEach(^{
testHashId = 1457689;
testMTU = 5984649;
testProtocolVersion = @"1.32.32";
- testPayload = [[SDLControlFramePayloadRPCStartServiceAck alloc] initWithHashId:testHashId mtu:testMTU protocolVersion:testProtocolVersion secondaryTransports:nil audioServiceTransports:nil videoServiceTransports:nil];
+ testPayload = [[SDLControlFramePayloadRPCStartServiceAck alloc] initWithHashId:testHashId mtu:testMTU authToken:nil protocolVersion:testProtocolVersion secondaryTransports:nil audioServiceTransports:nil videoServiceTransports:nil];
});
it(@"should create the correct data", ^{
@@ -32,7 +32,7 @@ describe(@"Test encoding data", ^{
});
});
- context(@"with secondary transport paramaters", ^{
+ context(@"with secondary transport parameters", ^{
beforeEach(^{
testHashId = 987654;
testMTU = 4096;
@@ -41,7 +41,7 @@ describe(@"Test encoding data", ^{
testAudioServiceTransports = @[@(2)];
testVideoServiceTransports = @[(@2), @(1)];
- testPayload = [[SDLControlFramePayloadRPCStartServiceAck alloc] initWithHashId:testHashId mtu:testMTU protocolVersion:testProtocolVersion secondaryTransports:testSecondaryTransports audioServiceTransports:testAudioServiceTransports videoServiceTransports:testVideoServiceTransports];
+ testPayload = [[SDLControlFramePayloadRPCStartServiceAck alloc] initWithHashId:testHashId mtu:testMTU authToken:nil protocolVersion:testProtocolVersion secondaryTransports:testSecondaryTransports audioServiceTransports:testAudioServiceTransports videoServiceTransports:testVideoServiceTransports];
});
it(@"should create the correct data", ^{
@@ -54,7 +54,7 @@ describe(@"Test encoding data", ^{
testHashId = SDLControlFrameInt32NotFound;
testMTU = SDLControlFrameInt64NotFound;
- testPayload = [[SDLControlFramePayloadRPCStartServiceAck alloc] initWithHashId:testHashId mtu:testMTU protocolVersion:nil secondaryTransports:nil audioServiceTransports:nil videoServiceTransports:nil];
+ testPayload = [[SDLControlFramePayloadRPCStartServiceAck alloc] initWithHashId:testHashId mtu:testMTU authToken:nil protocolVersion:nil secondaryTransports:nil audioServiceTransports:nil videoServiceTransports:nil];
});
it(@"should create no data", ^{
@@ -68,18 +68,20 @@ describe(@"Test decoding data", ^{
__block NSData *testData = nil;
__block int32_t testHashId = 0;
__block int64_t testMTU = 0;
+ __block NSString *testAuthToken = nil;
__block NSString *testProtocolVersion = nil;
__block NSArray<NSString *> *testSecondaryTransports = nil;
__block NSArray<NSNumber *> *testAudioServiceTransports = nil;
__block NSArray<NSNumber *> *testVideoServiceTransports = nil;
- context(@"with paramaters", ^{
+ context(@"with parameters", ^{
beforeEach(^{
testHashId = 1545784;
testMTU = 989786483;
+ testAuthToken = @"testAuthToken";
testProtocolVersion = @"3.89.5";
- SDLControlFramePayloadRPCStartServiceAck *firstPayload = [[SDLControlFramePayloadRPCStartServiceAck alloc] initWithHashId:testHashId mtu:testMTU protocolVersion:testProtocolVersion secondaryTransports:nil audioServiceTransports:nil videoServiceTransports:nil];
+ SDLControlFramePayloadRPCStartServiceAck *firstPayload = [[SDLControlFramePayloadRPCStartServiceAck alloc] initWithHashId:testHashId mtu:testMTU authToken:testAuthToken protocolVersion:testProtocolVersion secondaryTransports:nil audioServiceTransports:nil videoServiceTransports:nil];
testData = firstPayload.data;
testPayload = [[SDLControlFramePayloadRPCStartServiceAck alloc] initWithData:testData];
@@ -88,20 +90,25 @@ describe(@"Test decoding data", ^{
it(@"should output the correct params", ^{
expect(testPayload.hashId).to(equal(testHashId));
expect(testPayload.mtu).to(equal(testMTU));
+ expect(testPayload.authToken).to(equal(testAuthToken));
expect(testPayload.protocolVersion).to(equal(testProtocolVersion));
+ expect(testPayload.secondaryTransports).to(beNil());
+ expect(testPayload.audioServiceTransports).to(beNil());
+ expect(testPayload.videoServiceTransports).to(beNil());
});
});
- context(@"with secondary transportparamaters", ^{
+ context(@"with secondary transport parameters", ^{
beforeEach(^{
testHashId = 17999024;
testMTU = 1798250;
+ testAuthToken = @"testAuthToken";
testProtocolVersion = @"6.01.00";
testSecondaryTransports = @[@"TCP_WIFI"];
testAudioServiceTransports = @[@(2), @(1)];
testVideoServiceTransports = @[@(1)];
- SDLControlFramePayloadRPCStartServiceAck *firstPayload = [[SDLControlFramePayloadRPCStartServiceAck alloc] initWithHashId:testHashId mtu:testMTU protocolVersion:testProtocolVersion secondaryTransports:testSecondaryTransports audioServiceTransports:testAudioServiceTransports videoServiceTransports:testVideoServiceTransports];
+ SDLControlFramePayloadRPCStartServiceAck *firstPayload = [[SDLControlFramePayloadRPCStartServiceAck alloc] initWithHashId:testHashId mtu:testMTU authToken:testAuthToken protocolVersion:testProtocolVersion secondaryTransports:testSecondaryTransports audioServiceTransports:testAudioServiceTransports videoServiceTransports:testVideoServiceTransports];
testData = firstPayload.data;
testPayload = [[SDLControlFramePayloadRPCStartServiceAck alloc] initWithData:testData];
@@ -110,6 +117,7 @@ describe(@"Test decoding data", ^{
it(@"should output the correct params", ^{
expect(testPayload.hashId).to(equal(testHashId));
expect(testPayload.mtu).to(equal(testMTU));
+ expect(testPayload.authToken).to(equal(testAuthToken));
expect(testPayload.protocolVersion).to(equal(testProtocolVersion));
expect(testPayload.secondaryTransports).to(equal(testSecondaryTransports));
expect(testPayload.audioServiceTransports).to(equal(testAudioServiceTransports));