summaryrefslogtreecommitdiff
path: root/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnInteriorVehicleDataSpec.m
diff options
context:
space:
mode:
Diffstat (limited to 'SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnInteriorVehicleDataSpec.m')
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnInteriorVehicleDataSpec.m44
1 files changed, 44 insertions, 0 deletions
diff --git a/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnInteriorVehicleDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnInteriorVehicleDataSpec.m
new file mode 100644
index 000000000..5f846d988
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnInteriorVehicleDataSpec.m
@@ -0,0 +1,44 @@
+//
+// SDLOnInteriorVehicleDataSpec.m
+// SmartDeviceLink-iOS
+//
+
+#import <Foundation/Foundation.h>
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLOnInteriorVehicleData.h"
+#import "SDLNames.h"
+#import "SDLModuleData.h"
+
+QuickSpecBegin(SDLOnInteriorVehicleDataSpec)
+SDLModuleData* someModuleData = [[SDLModuleData alloc] init];
+
+describe(@"Getter/Setter Tests", ^ {
+ it(@"Should set and get correctly", ^ {
+ SDLOnInteriorVehicleData* testNotification = [[SDLOnInteriorVehicleData alloc] init];
+
+ testNotification.moduleData = someModuleData;
+
+ expect(testNotification.moduleData).to(equal(someModuleData));
+ });
+
+ it(@"Should get correctly when initialized", ^ {
+ NSMutableDictionary<NSString *, id> *dict = [@{SDLNameNotification:
+ @{SDLNameParameters:
+ @{SDLNameModuleData:someModuleData},
+ SDLNameOperationName:SDLNameOnInteriorVehicleData}} mutableCopy];
+ SDLOnInteriorVehicleData* testNotification = [[SDLOnInteriorVehicleData alloc] initWithDictionary:dict];
+
+ expect(testNotification.moduleData).to(equal(someModuleData));
+ });
+
+ it(@"Should return nil if not set", ^ {
+ SDLOnInteriorVehicleData* testNotification = [[SDLOnInteriorVehicleData alloc] init];
+
+ expect(testNotification.moduleData).to(beNil());
+ });
+});
+
+QuickSpecEnd