forked from kishikawakatsumi/JavaScriptBridge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJSBCoreDataTest.m
More file actions
144 lines (134 loc) · 5.64 KB
/
JSBCoreDataTest.m
File metadata and controls
144 lines (134 loc) · 5.64 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#import <XCTest/XCTest.h>
#import "JavaScriptBridge.h"
@import JavaScriptCore;
@interface JSBCoreDataTests : XCTestCase
@end
@implementation JSBCoreDataTests
- (void)setUp
{
[super setUp];
}
- (void)tearDown
{
[super tearDown];
}
- (void)testInstantiation
{
JSContext *context = [[JSContext alloc] init];
[context addScriptingSupport:@"CoreData"];
XCTAssertNotNil(context);
// JSValue *value = nil;
//
// [context evaluateScript:@"var nsatomicstorecachenode = NSAtomicStoreCacheNode.new();"];
// value = context[@"nsatomicstorecachenode"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsentitydescription = NSEntityDescription.new();"];
// value = context[@"nsentitydescription"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsentitymapping = NSEntityMapping.new();"];
// value = context[@"nsentitymapping"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsentitymigrationpolicy = NSEntityMigrationPolicy.new();"];
// value = context[@"nsentitymigrationpolicy"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsfetchedresultscontroller = NSFetchedResultsController.new();"];
// value = context[@"nsfetchedresultscontroller"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsincrementalstorenode = NSIncrementalStoreNode.new();"];
// value = context[@"nsincrementalstorenode"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsmanagedobject = NSManagedObject.new();"];
// value = context[@"nsmanagedobject"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsmanagedobjectcontext = NSManagedObjectContext.new();"];
// value = context[@"nsmanagedobjectcontext"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsmanagedobjectid = NSManagedObjectID.new();"];
// value = context[@"nsmanagedobjectid"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsmanagedobjectmodel = NSManagedObjectModel.new();"];
// value = context[@"nsmanagedobjectmodel"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsmappingmodel = NSMappingModel.new();"];
// value = context[@"nsmappingmodel"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsmergeconflict = NSMergeConflict.new();"];
// value = context[@"nsmergeconflict"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsmergepolicy = NSMergePolicy.new();"];
// value = context[@"nsmergepolicy"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsmigrationmanager = NSMigrationManager.new();"];
// value = context[@"nsmigrationmanager"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nspersistentstore = NSPersistentStore.new();"];
// value = context[@"nspersistentstore"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nspersistentstorecoordinator = NSPersistentStoreCoordinator.new();"];
// value = context[@"nspersistentstorecoordinator"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nspersistentstorerequest = NSPersistentStoreRequest.new();"];
// value = context[@"nspersistentstorerequest"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nspropertydescription = NSPropertyDescription.new();"];
// value = context[@"nspropertydescription"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nspropertymapping = NSPropertyMapping.new();"];
// value = context[@"nspropertymapping"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsatomicstore = NSAtomicStore.new();"];
// value = context[@"nsatomicstore"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsattributedescription = NSAttributeDescription.new();"];
// value = context[@"nsattributedescription"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsexpressiondescription = NSExpressionDescription.new();"];
// value = context[@"nsexpressiondescription"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsfetchrequest = NSFetchRequest.new();"];
// value = context[@"nsfetchrequest"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsfetchrequestexpression = NSFetchRequestExpression.new();"];
// value = context[@"nsfetchrequestexpression"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsfetchedpropertydescription = NSFetchedPropertyDescription.new();"];
// value = context[@"nsfetchedpropertydescription"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsincrementalstore = NSIncrementalStore.new();"];
// value = context[@"nsincrementalstore"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nsrelationshipdescription = NSRelationshipDescription.new();"];
// value = context[@"nsrelationshipdescription"];
// XCTAssertTrue(value && !value.isUndefined);
//
// [context evaluateScript:@"var nssavechangesrequest = NSSaveChangesRequest.new();"];
// value = context[@"nssavechangesrequest"];
// XCTAssertTrue(value && !value.isUndefined);
}
@end