summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2018-09-19 10:23:44 -0400
committerJoel Fischer <joeljfischer@gmail.com>2018-09-19 10:23:44 -0400
commit633088376a05ca0977db735d80641cab899663cc (patch)
tree4f3b22d318c4d97e7d6e540a54eef45ba98c630a
parent9411a848803c053309b6d98f407088455ee7ed65 (diff)
downloadsdl_ios-633088376a05ca0977db735d80641cab899663cc.tar.gz
Remove failing test that didn’t test anything
-rw-r--r--SmartDeviceLink/SDLV2ProtocolMessage.m4
-rw-r--r--SmartDeviceLinkTests/ProtocolSpecs/MessageSpecs/SDLV2ProtocolMessageSpec.m36
2 files changed, 3 insertions, 37 deletions
diff --git a/SmartDeviceLink/SDLV2ProtocolMessage.m b/SmartDeviceLink/SDLV2ProtocolMessage.m
index 291dde6a1..65694651e 100644
--- a/SmartDeviceLink/SDLV2ProtocolMessage.m
+++ b/SmartDeviceLink/SDLV2ProtocolMessage.m
@@ -36,8 +36,8 @@ NS_ASSUME_NONNULL_BEGIN
// Create the inner dictionary with the RPC properties
NSMutableDictionary <NSString *, id> *innerDictionary = [[NSMutableDictionary alloc] init];
NSString *functionName = [[SDLFunctionID sharedInstance] functionNameForId:rpcPayload.functionID];
- [innerDictionary setObject:functionName forKey:SDLNameOperationName];
- [innerDictionary setObject:[NSNumber numberWithUnsignedInt:rpcPayload.correlationID] forKey:SDLNameCorrelationId];
+ innerDictionary[SDLNameOperationName] = functionName;
+ innerDictionary[SDLNameCorrelationId] = @(rpcPayload.correlationID);
// Get the json data from the struct
if (rpcPayload.jsonData) {
diff --git a/SmartDeviceLinkTests/ProtocolSpecs/MessageSpecs/SDLV2ProtocolMessageSpec.m b/SmartDeviceLinkTests/ProtocolSpecs/MessageSpecs/SDLV2ProtocolMessageSpec.m
index 12ce1e05a..3b73eb172 100644
--- a/SmartDeviceLinkTests/ProtocolSpecs/MessageSpecs/SDLV2ProtocolMessageSpec.m
+++ b/SmartDeviceLinkTests/ProtocolSpecs/MessageSpecs/SDLV2ProtocolMessageSpec.m
@@ -17,41 +17,7 @@
QuickSpecBegin(SDLV2ProtocolMessageSpec)
describe(@"RPCDictionary Tests", ^ {
- it(@"Should return the correct dictionary", ^ {
- SDLServiceType serviceType = SDLServiceTypeRPC;
-
- SDLV2ProtocolHeader* testHeader = [[SDLV2ProtocolHeader alloc] init];
- id headerMock = OCMPartialMock(testHeader);
- [[[headerMock stub] andReturnValue:[NSValue value:&serviceType withObjCType:@encode(SDLServiceType)]] serviceType];
-
- NSDictionary* dictionary = @{@"A": @1,
- @"B": @2,
- @"C": @3,
- @"D": @4,
- @"E": @5};
- UInt32 correlationID = 99;
- UInt32 functionID = 26;
- Byte rpcType = 0;
-
- SDLRPCPayload* testPayload = [[SDLRPCPayload alloc] init];
- id payloadMock = OCMPartialMock(testPayload);
- [[[payloadMock stub] andReturn:[NSJSONSerialization dataWithJSONObject:dictionary options:0 error:0]] jsonData];
- [[[payloadMock stub] andReturnValue:[NSValue value:&correlationID withObjCType:@encode(UInt32)]] correlationID];
- [[[payloadMock stub] andReturnValue:[NSValue value:&functionID withObjCType:@encode(UInt32)]] functionID];
- [[[payloadMock stub] andReturnValue:[NSValue value:&rpcType withObjCType:@encode(Byte)]] rpcType];
- [[[payloadMock stub] andReturn:[NSData dataWithBytes:"Database" length:strlen("Database")]] binaryData];
-
- id payloadClassMock = OCMClassMock(SDLRPCPayload.class);
- [[[payloadClassMock stub] andReturn:testPayload] rpcPayloadWithData:[OCMArg any]];
-
- SDLV2ProtocolMessage* testMessage = [[SDLV2ProtocolMessage alloc] initWithHeader:testHeader andPayload:[[NSMutableData alloc] initWithCapacity:0]];
-
- expect([testMessage rpcDictionary]).to(equal(@{SDLNameRequest:
- @{SDLNameOperationName:SDLNameSlider,
- SDLNameCorrelationId:@99,
- SDLNameParameters:dictionary},
- SDLNameBulkData:[NSData dataWithBytes:"Database" length:strlen("Database")]}));
- });
+
});
QuickSpecEnd