File tree Expand file tree Collapse file tree 9 files changed +7
-67
lines changed
Other/TestCases/UnitTestCase Expand file tree Collapse file tree 9 files changed +7
-67
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ - (void)setUp {
42
42
- (void )tearDown {
43
43
[[Parse _currentManager ] clearEventuallyQueue ];
44
44
[Parse _clearCurrentManager ];
45
- [PFObjectSubclassingController clearDefaultController ];
46
45
47
46
[super tearDown ];
48
47
}
Original file line number Diff line number Diff line change @@ -218,8 +218,6 @@ - (void)testDefaultACL {
218
218
}
219
219
220
220
- (void )testACLRequiresObjectId {
221
- [PFUser registerSubclass ];
222
-
223
221
PFACL *acl = [PFACL ACL ];
224
222
#pragma clang diagnostic push
225
223
#pragma clang diagnostic ignored "-Wnonnull"
Original file line number Diff line number Diff line change @@ -105,22 +105,6 @@ @interface ObjectSubclassPropertiesTests : PFUnitTestCase
105
105
106
106
@implementation ObjectSubclassPropertiesTests
107
107
108
- // /--------------------------------------
109
- #pragma mark - XCTestCase
110
- // /--------------------------------------
111
-
112
- - (void )setUp {
113
- [super setUp ];
114
-
115
- [PFTestObject registerSubclass ];
116
- }
117
-
118
- - (void )tearDown {
119
- [PFObject unregisterSubclass: [PFTestObject class ]];
120
-
121
- [super tearDown ];
122
- }
123
-
124
108
// /--------------------------------------
125
109
#pragma mark - Tests
126
110
// /--------------------------------------
Original file line number Diff line number Diff line change 17
17
#pragma mark - Helpers
18
18
// /--------------------------------------
19
19
20
- @interface TheFlash : PFObject <PFSubclassing > {
20
+ @interface TheFlash : PFObject <PFSubclassingSkipAutomaticRegistration > {
21
21
NSString *flashName;
22
22
}
23
23
@@ -59,7 +59,7 @@ + (NSString *)parseClassName {
59
59
60
60
@end
61
61
62
- @interface ClassWithDirtyingConstructor : PFObject <PFSubclassing >
62
+ @interface ClassWithDirtyingConstructor : PFObject <PFSubclassingSkipAutomaticRegistration >
63
63
@end
64
64
65
65
@implementation ClassWithDirtyingConstructor
@@ -85,7 +85,7 @@ @interface UtilityClass : PFObject
85
85
@implementation UtilityClass
86
86
@end
87
87
88
- @interface DescendantOfUtility : UtilityClass <PFSubclassing >
88
+ @interface DescendantOfUtility : UtilityClass <PFSubclassingSkipAutomaticRegistration >
89
89
@end
90
90
91
91
@implementation DescendantOfUtility
@@ -120,17 +120,6 @@ @interface ObjectSubclassTests : PFUnitTestCase
120
120
121
121
@implementation ObjectSubclassTests
122
122
123
- // /--------------------------------------
124
- #pragma mark - XCTestCase
125
- // /--------------------------------------
126
-
127
- - (void )tearDown {
128
- [PFObject unregisterSubclass: [TheFlash class ]];
129
- [PFObject unregisterSubclass: [BarryAllen class ]];
130
-
131
- [super tearDown ];
132
- }
133
-
134
123
// /--------------------------------------
135
124
#pragma mark - Tests
136
125
// /--------------------------------------
Original file line number Diff line number Diff line change 15
15
#import " PFUnitTestCase.h"
16
16
#import " ParseUnitTests-Swift.h"
17
17
18
- @interface TestSubclass : PFObject <PFSubclassing >
18
+ @interface TestSubclass : PFObject <PFSubclassingSkipAutomaticRegistration >
19
19
@end
20
20
21
- @interface NotSubclass : PFObject <PFSubclassing >
21
+ @interface NotSubclass : PFObject <PFSubclassingSkipAutomaticRegistration >
22
22
@end
23
23
24
- @interface PropertySubclass : PFObject <PFSubclassing > {
24
+ @interface PropertySubclass : PFObject <PFSubclassingSkipAutomaticRegistration > {
25
25
@public
26
26
id _ivarProperty;
27
27
}
Original file line number Diff line number Diff line change @@ -29,12 +29,11 @@ @implementation OfflineQueryLogicUnitTests
29
29
- (void )setUp {
30
30
[super setUp ];
31
31
32
- [PFUser registerSubclass ];
33
32
_user = [PFUser user ];
34
33
}
35
34
36
35
- (void )tearDown {
37
- [PFObject unregisterSubclass: [PFUser class ]] ;
36
+ _user = nil ;
38
37
39
38
[super tearDown ];
40
39
}
Original file line number Diff line number Diff line change @@ -25,22 +25,6 @@ @interface SessionControllerTests : PFUnitTestCase
25
25
26
26
@implementation SessionControllerTests
27
27
28
- // /--------------------------------------
29
- #pragma mark - XCTestCase
30
- // /--------------------------------------
31
-
32
- - (void )setUp {
33
- [super setUp ];
34
-
35
- [PFSession registerSubclass ];
36
- }
37
-
38
- - (void )tearDown {
39
- [PFObject unregisterSubclass: [PFSession class ]];
40
-
41
- [super tearDown ];
42
- }
43
-
44
28
// /--------------------------------------
45
29
#pragma mark - Helpers
46
30
// /--------------------------------------
Original file line number Diff line number Diff line change @@ -44,12 +44,7 @@ - (PFSessionController *)sessionControllerMockWithSessionResult:(PFSession *)ses
44
44
// /--------------------------------------
45
45
46
46
- (void )testSessionClassIsRegistered {
47
- [PFObject unregisterSubclass: [PFSession class ]];
48
- [Parse setApplicationId: @" a" clientKey: @" b" ];
49
47
XCTAssertNotNil ([PFSession query ]);
50
-
51
- [[Parse _currentManager ] clearEventuallyQueue ];
52
- [Parse _clearCurrentManager ];
53
48
}
54
49
55
50
- (void )testConstructorsClassNameValidation {
@@ -58,8 +53,6 @@ - (void)testConstructorsClassNameValidation {
58
53
}
59
54
60
55
- (void )testSessionImmutableFieldsCannotBeChanged {
61
- [PFSession registerSubclass ];
62
-
63
56
PFSession *session = [PFSession object ];
64
57
session[@" yolo" ] = @" El Capitan!" ; // Test for regular mutability
65
58
PFAssertThrowsInvalidArgumentException (session[@" sessionToken" ] = @" a" );
@@ -71,8 +64,6 @@ - (void)testSessionImmutableFieldsCannotBeChanged {
71
64
}
72
65
73
66
- (void )testSessionImmutableFieldsCannotBeDeleted {
74
- [PFSession registerSubclass ];
75
-
76
67
PFSession *session = [PFSession object ];
77
68
78
69
[session removeObjectForKey: @" yolo" ];// Test for regular mutability
Original file line number Diff line number Diff line change @@ -25,15 +25,11 @@ - (void)testConstructorsClassNameValidation {
25
25
}
26
26
27
27
- (void )testImmutableFieldsCannotBeChanged {
28
- [PFUser registerSubclass ];
29
-
30
28
PFUser *user = [PFUser object ];
31
29
PFAssertThrowsInvalidArgumentException (user[@" sessionToken" ] = @" a" );
32
30
}
33
31
34
32
- (void )testImmutableFieldsCannotBeDeleted {
35
- [PFUser registerSubclass ];
36
-
37
33
PFUser *user = [PFUser object ];
38
34
PFAssertThrowsInvalidArgumentException ([user removeObjectForKey: @" username" ]);
39
35
PFAssertThrowsInvalidArgumentException ([user removeObjectForKey: @" sessionToken" ]);
You can’t perform that action at this time.
0 commit comments