blob: 9352569ed3e8630a87fb5bfb2b24667702b2c03f (
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
|
//
// SDLRPCStruct.m
// SmartDeviceLink-iOS
#import <Foundation/Foundation.h>
#import <Quick/Quick.h>
#import <Nimble/Nimble.h>
#import "SDLRPCStruct.h"
QuickSpecBegin(SDLRPCStructSpec)
describe(@"SerializeAsDictionary Tests", ^ {
it(@"Should serialize correctly", ^ {
NSMutableDictionary* dict = [@{@"Key":@"Value", @"Answer":@42, @"Struct":[[SDLRPCStruct alloc] initWithDictionary:[@{@"Array":@[@1, @1, @1, @1]} mutableCopy]]} mutableCopy];
SDLRPCStruct* testStruct = [[SDLRPCStruct alloc] initWithDictionary:dict];
expect([testStruct serializeAsDictionary:2]).to(equal([@{@"Key":@"Value", @"Answer":@42, @"Struct":@{@"Array":@[@1, @1, @1, @1]}} mutableCopy]));
});
});
QuickSpecEnd
|