diff options
Diffstat (limited to 'SmartDeviceLinkTests/RPCSpecs/SuperclassSpecs/SDLRPCResponseSpec.m')
-rw-r--r-- | SmartDeviceLinkTests/RPCSpecs/SuperclassSpecs/SDLRPCResponseSpec.m | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/SmartDeviceLinkTests/RPCSpecs/SuperclassSpecs/SDLRPCResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/SuperclassSpecs/SDLRPCResponseSpec.m index f99d19b5b..073135985 100644 --- a/SmartDeviceLinkTests/RPCSpecs/SuperclassSpecs/SDLRPCResponseSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/SuperclassSpecs/SDLRPCResponseSpec.m @@ -8,6 +8,7 @@ #import <Quick/Quick.h> #import <Nimble/Nimble.h> +#import "SDLNames.h" #import "SDLResult.h" #import "SDLRPCResponse.h" @@ -28,6 +29,24 @@ describe(@"Getter/Setter Tests", ^ { expect(response.resultCode).to(equal(SDLResultIgnored)); expect(response.info).to(equal(@"It has been done")); }); + + it(@"Should get correctly when initialized", ^ { + NSMutableDictionary* dict = [@{SDLNameResponse: + @{SDLNameParameters: + @{SDLNameSuccess:@YES, + SDLNameResultCode:SDLNameSuccess, + SDLNameInfo:@"Test Info"}, + SDLNameCorrelationId:@1004, + SDLNameOperationName:SDLNameResponse}} mutableCopy]; + SDLRPCResponse* testResponse = [[SDLRPCResponse alloc] initWithDictionary:dict]; + + expect(testResponse.getFunctionName).to(equal(SDLNameResponse)); + expect(testResponse.correlationID).to(equal(@1004)); + expect(testResponse.success).to(equal(@YES)); + expect(testResponse.resultCode).to(equal(SDLNameSuccess)); + expect(testResponse.info).to(equal(@"Test Info")); + + }); }); QuickSpecEnd |