File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,9 @@ + (void)initialize {
55
55
// /--------------------------------------
56
56
57
57
+ (void )setApplicationId : (NSString *)applicationId clientKey : (NSString *)clientKey {
58
- // TODO: (nlutsenko) Add assert and unit test here that checks applicationId, clientKey not being nil.
59
-
58
+ PFConsistencyAssert ([applicationId length ], @" 'applicationId' should not be nil." );
59
+ PFConsistencyAssert ([clientKey length ], @" 'clientKey' should not be nil." );
60
+
60
61
// Setup new manager first, so it's 100% ready whenever someone sends a request for anything.
61
62
ParseManager *manager = [[ParseManager alloc ] initWithApplicationId: applicationId clientKey: clientKey];
62
63
[manager configureWithApplicationGroupIdentifier: applicationGroupIdentifier_
Original file line number Diff line number Diff line change @@ -45,4 +45,12 @@ - (void)testInitializeWithLDSAfterInitializeShouldThrowException {
45
45
[Parse setApplicationId: @" a" clientKey: @" b" ];
46
46
PFAssertThrowsInconsistencyException ([Parse enableLocalDatastore ]);
47
47
}
48
+
49
+ - (void )testInitializeWithNilApplicationIdNilClientKeyShouldThrowException {
50
+ NSString *yolo = nil ;
51
+ PFAssertThrowsInconsistencyException ([Parse setApplicationId: yolo clientKey: yolo]);
52
+ PFAssertThrowsInconsistencyException ([Parse setApplicationId: yolo clientKey: @" a" ]);
53
+ PFAssertThrowsInconsistencyException ([Parse setApplicationId: @" a" clientKey: yolo]);
54
+ }
55
+
48
56
@end
You can’t perform that action at this time.
0 commit comments