summaryrefslogtreecommitdiff
path: root/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLDeleteSubMenuSpec.m
blob: e35c7a64b86c4c97b631e5f34b389505d2ab397c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
//  SDLDeleteSubMenuSpec.m
//  SmartDeviceLink


#import <Foundation/Foundation.h>

#import <Quick/Quick.h>
#import <Nimble/Nimble.h>

#import "SDLDeleteSubMenu.h"
#import "SDLRPCParameterNames.h"
#import "SDLRPCFunctionNames.h"

QuickSpecBegin(SDLDeleteSubMenuSpec)

describe(@"Getter/Setter Tests", ^ {
    it(@"Should set and get correctly", ^ {
        SDLDeleteSubMenu* testRequest = [[SDLDeleteSubMenu alloc] init];
        
		testRequest.menuID = @25614;

		expect(testRequest.menuID).to(equal(@25614));
    });
    
    it(@"Should get correctly when initialized", ^ {
        NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest:
                                                           @{SDLRPCParameterNameParameters:
                                                                 @{SDLRPCParameterNameMenuID:@25614},
                                                             SDLRPCParameterNameOperationName:SDLRPCFunctionNameDeleteSubMenu}} mutableCopy];
        SDLDeleteSubMenu* testRequest = [[SDLDeleteSubMenu alloc] initWithDictionary:dict];
        
        expect(testRequest.menuID).to(equal(@25614));
    });

    it(@"Should return nil if not set", ^ {
        SDLDeleteSubMenu* testRequest = [[SDLDeleteSubMenu alloc] init];
        
		expect(testRequest.menuID).to(beNil());
	});
});

QuickSpecEnd