diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2016-05-25 08:44:23 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2016-05-25 08:44:23 -0400 |
commit | fb8e9903a323acaf5fc78819bb3c203567542ab2 (patch) | |
tree | e40665103ac7db492e0a40e34cd92f3390defa55 /SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLResetGlobalPropertiesSpec.m | |
parent | f7540a02262832e34c67b0953dd8a1804a046fea (diff) | |
download | sdl_ios-fb8e9903a323acaf5fc78819bb3c203567542ab2.tar.gz |
Shift files into root directory
Diffstat (limited to 'SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLResetGlobalPropertiesSpec.m')
-rw-r--r-- | SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLResetGlobalPropertiesSpec.m | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLResetGlobalPropertiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLResetGlobalPropertiesSpec.m new file mode 100644 index 000000000..e99320f18 --- /dev/null +++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLResetGlobalPropertiesSpec.m @@ -0,0 +1,43 @@ +// +// SDLResetGlobalPropertiesSpec.m +// SmartDeviceLink + + +#import <Foundation/Foundation.h> + +#import <Quick/Quick.h> +#import <Nimble/Nimble.h> + +#import "SDLResetGlobalProperties.h" +#import "SDLGlobalProperty.h" +#import "SDLNames.h" + +QuickSpecBegin(SDLResetGlobalPropertiesSpec) + +describe(@"Getter/Setter Tests", ^ { + it(@"Should set and get correctly", ^ { + SDLResetGlobalProperties* testRequest = [[SDLResetGlobalProperties alloc] init]; + + testRequest.properties = [@[[SDLGlobalProperty MENUNAME], [SDLGlobalProperty VRHELPTITLE]] copy]; + + expect(testRequest.properties).to(equal([@[[SDLGlobalProperty MENUNAME], [SDLGlobalProperty VRHELPTITLE]] copy])); + }); + + it(@"Should get correctly when initialized", ^ { + NSMutableDictionary* dict = [@{NAMES_request: + @{NAMES_parameters: + @{NAMES_properties:[@[[SDLGlobalProperty MENUNAME], [SDLGlobalProperty VRHELPTITLE]] copy]}, + NAMES_operation_name:NAMES_ResetGlobalProperties}} mutableCopy]; + SDLResetGlobalProperties* testRequest = [[SDLResetGlobalProperties alloc] initWithDictionary:dict]; + + expect(testRequest.properties).to(equal([@[[SDLGlobalProperty MENUNAME], [SDLGlobalProperty VRHELPTITLE]] copy])); + }); + + it(@"Should return nil if not set", ^ { + SDLResetGlobalProperties* testRequest = [[SDLResetGlobalProperties alloc] init]; + + expect(testRequest.properties).to(beNil()); + }); +}); + +QuickSpecEnd
\ No newline at end of file |