diff options
author | james <james@jamess-MacBook-Pro.local> | 2017-08-14 13:04:34 -0400 |
---|---|---|
committer | james <james@jamess-MacBook-Pro.local> | 2017-08-14 13:04:34 -0400 |
commit | 95dbde54cbc03a0aec2901f98cb74758756bc32f (patch) | |
tree | 822c2df7e750dcd01ee1c51f57fac37f5733fac1 /SmartDeviceLinkTests/RPCSpecs/NotificationSpecs | |
parent | 88190e21888425beceb1ca61c51f69b7968b8633 (diff) | |
download | sdl_ios-95dbde54cbc03a0aec2901f98cb74758756bc32f.tar.gz |
Added remote control RPCs and unit tests
Diffstat (limited to 'SmartDeviceLinkTests/RPCSpecs/NotificationSpecs')
-rw-r--r-- | SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnInteriorVehicleDataSpec.m | 44 |
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 |