summaryrefslogtreecommitdiff
path: root/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLDiagnosticMessageResponseSpec.m
diff options
context:
space:
mode:
Diffstat (limited to 'SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLDiagnosticMessageResponseSpec.m')
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLDiagnosticMessageResponseSpec.m42
1 files changed, 42 insertions, 0 deletions
diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLDiagnosticMessageResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLDiagnosticMessageResponseSpec.m
new file mode 100644
index 000000000..7507bbe5a
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLDiagnosticMessageResponseSpec.m
@@ -0,0 +1,42 @@
+//
+// SDLDiagnosticMessageResponseSpec.m
+// SmartDeviceLink
+
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLDiagnosticMessageResponse.h"
+#import "SDLNames.h"
+
+QuickSpecBegin(SDLDiagnosticMessageResponseSpec)
+
+describe(@"Getter/Setter Tests", ^ {
+ it(@"Should set and get correctly", ^ {
+ SDLDiagnosticMessageResponse* testResponse = [[SDLDiagnosticMessageResponse alloc] init];
+
+ testResponse.messageDataResult = [@[@3, @9, @27, @81] mutableCopy];
+
+ expect(testResponse.messageDataResult).to(equal([@[@3, @9, @27, @81] mutableCopy]));
+ });
+
+ it(@"Should get correctly when initialized", ^ {
+ NSMutableDictionary* dict = [@{NAMES_response:
+ @{NAMES_parameters:
+ @{NAMES_messageDataResult:[@[@3, @9, @27, @81] mutableCopy]},
+ NAMES_operation_name:NAMES_DiagnosticMessage}} mutableCopy];
+ SDLDiagnosticMessageResponse* testResponse = [[SDLDiagnosticMessageResponse alloc] initWithDictionary:dict];
+
+ expect(testResponse.messageDataResult).to(equal([@[@3, @9, @27, @81] mutableCopy]));
+ });
+
+ it(@"Should return nil if not set", ^ {
+ SDLDiagnosticMessageResponse* testResponse = [[SDLDiagnosticMessageResponse alloc] init];
+
+ expect(testResponse.messageDataResult).to(beNil());
+ });
+});
+
+QuickSpecEnd \ No newline at end of file