fable 3.0.86 → 3.0.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/debug/Harness.js +8 -10
  2. package/package.json +2 -2
  3. package/retold-harness/bookstore-serve-api.js +2 -2
  4. package/source/Fable.js +187 -50
  5. package/source/services/Fable-Service-Anticipate.js +1 -1
  6. package/source/services/Fable-Service-DataGeneration.js +1 -1
  7. package/source/services/Fable-Service-EnvironmentData-Web.js +1 -1
  8. package/source/services/Fable-Service-EnvironmentData.js +1 -1
  9. package/source/services/Fable-Service-FilePersistence-Web.js +2 -1
  10. package/source/services/Fable-Service-FilePersistence.js +25 -7
  11. package/source/services/Fable-Service-MetaTemplate.js +1 -1
  12. package/source/services/Fable-Service-Operation-DefaultSettings.js +4 -6
  13. package/source/services/Fable-Service-Operation.js +97 -2
  14. package/source/services/Fable-Service-RestClient.js +1 -1
  15. package/source/services/Fable-Service-Template.js +1 -1
  16. package/source/services/Fable-Service-Utility.js +3 -3
  17. package/test/Anticipate_tests.js +2 -2
  18. package/test/CSVParser_tests.js +1 -1
  19. package/test/Cache_tests.js +1 -1
  20. package/test/DataGeneration_tests.js +7 -7
  21. package/test/DateManipulation_tests.js +1 -1
  22. package/test/FableOperation_tests.js +33 -4
  23. package/test/FableServiceManager_tests.js +51 -51
  24. package/test/FilePersistence_tests.js +9 -9
  25. package/test/Manifest_tests.js +1 -1
  26. package/test/MetaTemplating_tests.js +1 -1
  27. package/test/RestClient_test.js +6 -6
  28. package/dist/fable.compatible.js +0 -3353
  29. package/dist/fable.compatible.min.js +0 -12
  30. package/dist/fable.compatible.min.js.map +0 -1
  31. package/dist/fable.js +0 -3353
  32. package/dist/fable.min.js +0 -12
  33. package/dist/fable.min.js.map +0 -1
  34. package/source/Fable-ServiceManager.js +0 -164
@@ -26,7 +26,7 @@ suite
26
26
  function (fTestComplete)
27
27
  {
28
28
  let testFable = new libFable();
29
- let tmpAnticipate = testFable.serviceManager.instantiateServiceProvider('Anticipate');
29
+ let tmpAnticipate = testFable.instantiateServiceProvider('Anticipate');
30
30
  tmpAnticipate.anticipate(function (fCallback)
31
31
  {
32
32
  testFable.log.info('Operation First test timeout entered...');
@@ -58,7 +58,7 @@ suite
58
58
  function (fTestComplete)
59
59
  {
60
60
  let testFable = new libFable();
61
- let tmpAnticipate = testFable.serviceManager.instantiateServiceProvider('Anticipate');
61
+ let tmpAnticipate = testFable.instantiateServiceProvider('Anticipate');
62
62
  tmpAnticipate.maxOperations = 2;
63
63
  tmpAnticipate.anticipate(function (fCallback)
64
64
  {
@@ -30,7 +30,7 @@ suite
30
30
  function(fDone)
31
31
  {
32
32
  let testFable = new libFable();
33
- let tmpCSVParser = testFable.serviceManager.instantiateServiceProvider('CSVParser', {Name: 'Big Complex Integration Operation'}, 'CSV Parser-123');
33
+ let tmpCSVParser = testFable.instantiateServiceProvider('CSVParser', {Name: 'Big Complex Integration Operation'}, 'CSV Parser-123');
34
34
  let tmpRecords = [];
35
35
 
36
36
  const tmpReadline = libReadline.createInterface(
@@ -28,7 +28,7 @@ suite
28
28
  {
29
29
  let testFable = new libFable();
30
30
 
31
- let testCache = testFable.serviceManager.instantiateServiceProvider('ObjectCache');
31
+ let testCache = testFable.instantiateServiceProvider('ObjectCache');
32
32
 
33
33
  testCache.maxLength = 2;
34
34
 
@@ -26,7 +26,7 @@ suite
26
26
  function (fTestComplete)
27
27
  {
28
28
  let testFable = new libFable();
29
- let tmpDataGeneration = testFable.serviceManager.instantiateServiceProvider('DataGeneration');
29
+ let tmpDataGeneration = testFable.instantiateServiceProvider('DataGeneration');
30
30
  Expect(tmpDataGeneration.randomIntegerUpTo(100)).to.be.within(0, 100);
31
31
  return fTestComplete();
32
32
  }
@@ -37,7 +37,7 @@ suite
37
37
  function (fTestComplete)
38
38
  {
39
39
  let testFable = new libFable();
40
- let tmpDataGeneration = testFable.serviceManager.instantiateServiceProvider('DataGeneration');
40
+ let tmpDataGeneration = testFable.instantiateServiceProvider('DataGeneration');
41
41
  Expect(tmpDataGeneration.randomNumericString()).to.be.a('string');
42
42
  Expect(tmpDataGeneration.randomNumericString().length).to.equal(10);
43
43
  return fTestComplete();
@@ -49,7 +49,7 @@ suite
49
49
  function (fTestComplete)
50
50
  {
51
51
  let testFable = new libFable();
52
- let tmpDataGeneration = testFable.serviceManager.instantiateServiceProvider('DataGeneration');
52
+ let tmpDataGeneration = testFable.instantiateServiceProvider('DataGeneration');
53
53
  testFable.log.info(`Random color: ${tmpDataGeneration.randomColor()}`);
54
54
  Expect(tmpDataGeneration.randomColor()).to.be.a('string');
55
55
  return fTestComplete();
@@ -61,7 +61,7 @@ suite
61
61
  function (fTestComplete)
62
62
  {
63
63
  let testFable = new libFable();
64
- let tmpDataGeneration = testFable.serviceManager.instantiateServiceProvider('DataGeneration');
64
+ let tmpDataGeneration = testFable.instantiateServiceProvider('DataGeneration');
65
65
  testFable.log.info(`Random Day of Week: ${tmpDataGeneration.randomDayOfWeek()}`);
66
66
  Expect(tmpDataGeneration.randomDayOfWeek()).to.be.a('string');
67
67
  return fTestComplete();
@@ -73,7 +73,7 @@ suite
73
73
  function (fTestComplete)
74
74
  {
75
75
  let testFable = new libFable();
76
- let tmpDataGeneration = testFable.serviceManager.instantiateServiceProvider('DataGeneration');
76
+ let tmpDataGeneration = testFable.instantiateServiceProvider('DataGeneration');
77
77
  testFable.log.info(`Random Month: ${tmpDataGeneration.randomMonth()}`);
78
78
  Expect(tmpDataGeneration.randomMonth()).to.be.a('string');
79
79
  return fTestComplete();
@@ -85,7 +85,7 @@ suite
85
85
  function (fTestComplete)
86
86
  {
87
87
  let testFable = new libFable();
88
- let tmpDataGeneration = testFable.serviceManager.instantiateServiceProvider('DataGeneration');
88
+ let tmpDataGeneration = testFable.instantiateServiceProvider('DataGeneration');
89
89
  testFable.log.info(`Random Name: ${tmpDataGeneration.randomName()}`);
90
90
  Expect(tmpDataGeneration.randomName()).to.be.a('string');
91
91
  return fTestComplete();
@@ -97,7 +97,7 @@ suite
97
97
  function (fTestComplete)
98
98
  {
99
99
  let testFable = new libFable();
100
- let tmpDataGeneration = testFable.serviceManager.instantiateServiceProvider('DataGeneration');
100
+ let tmpDataGeneration = testFable.instantiateServiceProvider('DataGeneration');
101
101
  testFable.log.info(`Random Surname: ${tmpDataGeneration.randomSurname()}`);
102
102
  Expect(tmpDataGeneration.randomSurname()).to.be.a('string');
103
103
  return fTestComplete();
@@ -29,7 +29,7 @@ suite
29
29
  function(fDone)
30
30
  {
31
31
  let testFable = new libFable();
32
- let tmpDates = testFable.serviceManager.instantiateServiceProvider('Dates');
32
+ let tmpDates = testFable.instantiateServiceProvider('Dates');
33
33
 
34
34
  testFable.log.info(`Guessing your timezone: ${tmpDates.dayJS.tz.guess()}`);
35
35
 
@@ -27,7 +27,7 @@ suite
27
27
  function()
28
28
  {
29
29
  let testFable = new libFable();
30
- let tmpOperation = testFable.serviceManager.instantiateServiceProvider('Operation', {Name: 'Big Complex Integration Operation'}, 'INTEGRATION-123');
30
+ let tmpOperation = testFable.instantiateServiceProvider('Operation', {Name: 'Big Complex Integration Operation'}, 'INTEGRATION-123');
31
31
  Expect(tmpOperation).to.be.an('object');
32
32
  Expect(testFable.servicesMap.Operation['INTEGRATION-123']).to.equal(tmpOperation);
33
33
  Expect(testFable.servicesMap.Operation['BADHASH']).to.be.undefined;
@@ -43,11 +43,11 @@ suite
43
43
  function()
44
44
  {
45
45
  let testFable = new libFable();
46
- let tmpOperation = testFable.serviceManager.instantiateServiceProvider('Operation', {Name: 'Big Complex Integration Operation'}, 'INTEGRATION-123');;
46
+ let tmpOperation = testFable.instantiateServiceProvider('Operation', {Name: 'Big Complex Integration Operation'}, 'INTEGRATION-123');;
47
47
  Expect(tmpOperation).to.be.an('object');
48
48
  Expect(tmpOperation.name).to.equal('Big Complex Integration Operation');
49
49
 
50
- let tmpCollisionOperation = testFable.serviceManager.instantiateServiceProvider('Operation', {Name: 'Another Big Complex Integration Operation with Colliding Name'}, 'INTEGRATION-123');;
50
+ let tmpCollisionOperation = testFable.instantiateServiceProvider('Operation', {Name: 'Another Big Complex Integration Operation with Colliding Name'}, 'INTEGRATION-123');;
51
51
  Expect(tmpCollisionOperation).to.be.an('object');
52
52
  Expect(tmpCollisionOperation.name).to.equal('Another Big Complex Integration Operation with Colliding Name');
53
53
 
@@ -61,7 +61,7 @@ suite
61
61
  function()
62
62
  {
63
63
  let testFable = new libFable();
64
- let tmpOperation = testFable.serviceManager.instantiateServiceProvider('Operation', {Name:'Another Big Complex Integration Operation'});
64
+ let tmpOperation = testFable.instantiateServiceProvider('Operation', {Name:'Another Big Complex Integration Operation'});
65
65
  Expect(tmpOperation).to.be.an('object');
66
66
  Expect(testFable.servicesMap.Operation.hasOwnProperty(tmpOperation.Hash)).to.equal(true);
67
67
  Expect(tmpOperation.state.Log.length).to.equal(0);
@@ -80,6 +80,35 @@ suite
80
80
  Expect(tmpOperation.state.Errors.length).to.equal(4);
81
81
  }
82
82
  );
83
+ test
84
+ (
85
+ 'Timing Stuff for Operations',
86
+ function(fDone)
87
+ {
88
+ let testFable = new libFable();
89
+ let tmpOperation = testFable.instantiateServiceProvider('Operation', {Name:'The last operation in town.'});
90
+ Expect(tmpOperation).to.be.an('object');
91
+ Expect(testFable.servicesMap.Operation.hasOwnProperty(tmpOperation.Hash)).to.equal(true);
92
+ Expect(tmpOperation.state.Log.length).to.equal(0);
93
+ let tmpText = `Operation ${tmpOperation.Hash} starting up...`;
94
+ tmpOperation.log.info(tmpText);
95
+ Expect(tmpOperation.state.Log.length).to.equal(1);
96
+ Expect(tmpOperation.state.Log[0]).to.contain(tmpText);
97
+
98
+ tmpOperation.addStep('001-Login',
99
+ (fStepComplete) =>
100
+ {
101
+ setTimeout(
102
+ () =>
103
+ {
104
+ tmpOperation.log.trace('Login thingy complete!');
105
+ return fStepComplete();
106
+ }, 150);
107
+ }, 'Example step 1!');
108
+
109
+ tmpOperation.execute(fDone);
110
+ }
111
+ );
83
112
  }
84
113
  );
85
114
  }
@@ -87,10 +87,10 @@ suite
87
87
  function ()
88
88
  {
89
89
  testFable = new libFable();
90
- testFable.serviceManager.addServiceType('SimpleService');
91
- testFable.serviceManager.instantiateServiceProvider('SimpleService', { SomeOption: true }, 'SimpleService-123');
90
+ testFable.addServiceType('SimpleService');
91
+ testFable.instantiateServiceProvider('SimpleService', { SomeOption: true }, 'SimpleService-123');
92
92
 
93
- Expect(testFable.serviceManager.servicesMap['SimpleService']['SimpleService-123']).to.be.an('object');
93
+ Expect(testFable.servicesMap['SimpleService']['SimpleService-123']).to.be.an('object');
94
94
  }
95
95
  );
96
96
  test
@@ -99,17 +99,17 @@ suite
99
99
  function ()
100
100
  {
101
101
  testFable = new libFable();
102
- testFable.serviceManager.addServiceType('SimpleService');
103
- testFable.serviceManager.extraServiceInitialization = (pService) =>
102
+ testFable.addServiceType('SimpleService');
103
+ testFable.extraServiceInitialization = (pService) =>
104
104
  {
105
105
  pService.MyFancyProperty = 'Fancy';
106
106
  return pService;
107
107
  }
108
- testFable.serviceManager.instantiateServiceProvider('SimpleService', { SomeOption: true }, 'TheBestOne');
108
+ testFable.instantiateServiceProvider('SimpleService', { SomeOption: true }, 'TheBestOne');
109
109
 
110
- Expect(testFable.serviceManager.services.SimpleService).to.be.an('object');
111
- Expect(testFable.serviceManager.services.SimpleService.MyFancyProperty).to.equal('Fancy');
112
- Expect(testFable.serviceManager.servicesMap.SimpleService.TheBestOne.MyFancyProperty).to.equal('Fancy');
110
+ Expect(testFable.services.SimpleService).to.be.an('object');
111
+ Expect(testFable.services.SimpleService.MyFancyProperty).to.equal('Fancy');
112
+ Expect(testFable.servicesMap.SimpleService.TheBestOne.MyFancyProperty).to.equal('Fancy');
113
113
  }
114
114
  );
115
115
  test
@@ -118,16 +118,16 @@ suite
118
118
  function ()
119
119
  {
120
120
  testFable = new libFable();
121
- testFable.serviceManager.addServiceType('SimpleService', SimpleService);
122
- testFable.serviceManager.instantiateServiceProvider('SimpleService', { SomeOption: true }, 'SimpleService-123');
121
+ testFable.addServiceType('SimpleService', SimpleService);
122
+ testFable.instantiateServiceProvider('SimpleService', { SomeOption: true }, 'SimpleService-123');
123
123
 
124
- Expect(testFable.serviceManager.servicesMap['SimpleService']['SimpleService-123']).to.be.an('object');
124
+ Expect(testFable.servicesMap['SimpleService']['SimpleService-123']).to.be.an('object');
125
125
 
126
- Expect(testFable.serviceManager.services['SimpleService']).to.be.an('object');
126
+ Expect(testFable.services['SimpleService']).to.be.an('object');
127
127
 
128
- testFable.serviceManager.services.SimpleService.doSomething();
128
+ testFable.services.SimpleService.doSomething();
129
129
 
130
- Expect(testFable.serviceManager.services['SimpleService'].Hash).to.equal('SimpleService-123');
130
+ Expect(testFable.services['SimpleService'].Hash).to.equal('SimpleService-123');
131
131
  }
132
132
  );
133
133
  test
@@ -137,13 +137,13 @@ suite
137
137
  {
138
138
  let testFable = new libFable({});
139
139
 
140
- testFable.serviceManager.addServiceType('SimpleService', SimpleService);
140
+ testFable.addServiceType('SimpleService', SimpleService);
141
141
 
142
- testFable.serviceManager.instantiateServiceProvider('SimpleService', { SomeOption: true }, 'SimpleService-13');
142
+ testFable.instantiateServiceProvider('SimpleService', { SomeOption: true }, 'SimpleService-13');
143
143
 
144
- testFable.serviceManager.servicesMap['SimpleService']['SimpleService-13'].doSomething();
144
+ testFable.servicesMap['SimpleService']['SimpleService-13'].doSomething();
145
145
 
146
- Expect(testFable.serviceManager.servicesMap['SimpleService']['SimpleService-13']).to.be.an('object');
146
+ Expect(testFable.servicesMap['SimpleService']['SimpleService-13']).to.be.an('object');
147
147
  }
148
148
  );
149
149
 
@@ -154,10 +154,10 @@ suite
154
154
  {
155
155
  let testFable = new libFable({});
156
156
 
157
- testFable.serviceManager.addServiceType('SimpleService', SimpleService);
157
+ testFable.addServiceType('SimpleService', SimpleService);
158
158
 
159
- let tmpService = testFable.serviceManager.instantiateServiceProviderWithoutRegistration('SimpleService', { SomeOption: true }, 'SimpleService-99');
160
- let tmpServiceFromPrototype = testFable.serviceManager.instantiateServiceProviderFromPrototype('SimpleService', { SomeOption: true }, 'SimpleService-100', SimpleService);
159
+ let tmpService = testFable.instantiateServiceProviderWithoutRegistration('SimpleService', { SomeOption: true }, 'SimpleService-99');
160
+ let tmpServiceFromPrototype = testFable.instantiateServiceProviderFromPrototype('SimpleService', { SomeOption: true }, 'SimpleService-100', SimpleService);
161
161
 
162
162
  Expect(testFable.servicesMap.SimpleService['SimpleService-99']).to.be.an('undefined');
163
163
  Expect(testFable.servicesMap.SimpleService['SimpleService-100']).to.be.an('object');
@@ -174,29 +174,29 @@ suite
174
174
  {
175
175
  let testFable = new libFable({});
176
176
 
177
- testFable.serviceManager.addServiceType('SimpleService', SimpleService);
178
- testFable.serviceManager.addServiceType('DatabaseService', MockDatabaseService);
177
+ testFable.addServiceType('SimpleService', SimpleService);
178
+ testFable.addServiceType('DatabaseService', MockDatabaseService);
179
179
 
180
- testFable.serviceManager.instantiateServiceProvider('SimpleService', { SomeOption: true });
181
- testFable.serviceManager.services.SimpleService.doSomething();
180
+ testFable.instantiateServiceProvider('SimpleService', { SomeOption: true });
181
+ testFable.services.SimpleService.doSomething();
182
182
 
183
- testFable.serviceManager.instantiateServiceProvider('DatabaseService', { ConnectionString: 'mongodb://localhost:27017/test' }, 'PrimaryConnection');
183
+ testFable.instantiateServiceProvider('DatabaseService', { ConnectionString: 'mongodb://localhost:27017/test' }, 'PrimaryConnection');
184
184
 
185
- Expect(testFable.serviceManager.services.DatabaseService.Hash).to.equal('PrimaryConnection');
185
+ Expect(testFable.services.DatabaseService.Hash).to.equal('PrimaryConnection');
186
186
 
187
- testFable.serviceManager.instantiateServiceProvider('DatabaseService', { ConnectionString: 'mongodb://localhost:27017/test' }, 'SecondaryConnection');
187
+ testFable.instantiateServiceProvider('DatabaseService', { ConnectionString: 'mongodb://localhost:27017/test' }, 'SecondaryConnection');
188
188
 
189
- Expect(testFable.serviceManager.services.DatabaseService.Hash).to.equal('PrimaryConnection');
189
+ Expect(testFable.services.DatabaseService.Hash).to.equal('PrimaryConnection');
190
190
 
191
- testFable.serviceManager.services.DatabaseService.connect();
192
- testFable.serviceManager.services.DatabaseService.commit('Test Record');
191
+ testFable.services.DatabaseService.connect();
192
+ testFable.services.DatabaseService.commit('Test Record');
193
193
 
194
- testFable.serviceManager.setDefaultServiceInstantiation('DatabaseService', 'SecondaryConnection');
194
+ testFable.setDefaultServiceInstantiation('DatabaseService', 'SecondaryConnection');
195
195
 
196
- testFable.serviceManager.services.DatabaseService.connect();
197
- testFable.serviceManager.services.DatabaseService.commit('Another Test Record');
196
+ testFable.services.DatabaseService.connect();
197
+ testFable.services.DatabaseService.commit('Another Test Record');
198
198
 
199
- Expect(testFable.serviceManager.services.DatabaseService.Hash).to.equal('SecondaryConnection');
199
+ Expect(testFable.services.DatabaseService.Hash).to.equal('SecondaryConnection');
200
200
  }
201
201
  );
202
202
 
@@ -239,7 +239,7 @@ suite
239
239
 
240
240
  let testFable = new libFable({});
241
241
 
242
- testFable.serviceManager.connectPreinitServiceProviderInstance(tmpCoreService);
242
+ testFable.connectPreinitServiceProviderInstance(tmpCoreService);
243
243
 
244
244
  Expect(testFable.servicesMap.MockCoreService['MockCoreService-2']).to.be.an('object');
245
245
  Expect(testFable.services.MockCoreService).to.be.an('object');
@@ -255,29 +255,29 @@ suite
255
255
  {
256
256
  let testFable = new libFable({});
257
257
 
258
- testFable.serviceManager.addServiceType('SimpleService', SimpleService);
259
- testFable.serviceManager.addServiceType('DatabaseService', MockDatabaseService);
258
+ testFable.addServiceType('SimpleService', SimpleService);
259
+ testFable.addServiceType('DatabaseService', MockDatabaseService);
260
260
 
261
- testFable.serviceManager.instantiateServiceProvider('SimpleService', { SomeOption: true });
262
- testFable.serviceManager.services.SimpleService.doSomething();
261
+ testFable.instantiateServiceProvider('SimpleService', { SomeOption: true });
262
+ testFable.services.SimpleService.doSomething();
263
263
 
264
- testFable.serviceManager.instantiateServiceProvider('DatabaseService', { ConnectionString: 'mongodb://localhost:27017/test' }, 'PrimaryConnection');
264
+ testFable.instantiateServiceProvider('DatabaseService', { ConnectionString: 'mongodb://localhost:27017/test' }, 'PrimaryConnection');
265
265
 
266
- Expect(testFable.serviceManager.services.DatabaseService.Hash).to.equal('PrimaryConnection');
266
+ Expect(testFable.services.DatabaseService.Hash).to.equal('PrimaryConnection');
267
267
 
268
- testFable.serviceManager.instantiateServiceProvider('DatabaseService', { ConnectionString: 'mongodb://localhost:27017/test' }, 'SecondaryConnection');
268
+ testFable.instantiateServiceProvider('DatabaseService', { ConnectionString: 'mongodb://localhost:27017/test' }, 'SecondaryConnection');
269
269
 
270
- Expect(testFable.serviceManager.services.DatabaseService.Hash).to.equal('PrimaryConnection');
270
+ Expect(testFable.services.DatabaseService.Hash).to.equal('PrimaryConnection');
271
271
 
272
- testFable.serviceManager.services.DatabaseService.connect();
273
- testFable.serviceManager.services.DatabaseService.commit('Test Record');
272
+ testFable.services.DatabaseService.connect();
273
+ testFable.services.DatabaseService.commit('Test Record');
274
274
 
275
- Expect(testFable.serviceManager.setDefaultServiceInstantiation('DatabaseService', 'TertiaryConnection')).to.be.false;
275
+ Expect(testFable.setDefaultServiceInstantiation('DatabaseService', 'TertiaryConnection')).to.be.false;
276
276
 
277
- testFable.serviceManager.services.DatabaseService.connect();
278
- testFable.serviceManager.services.DatabaseService.commit('Another Test Record');
277
+ testFable.services.DatabaseService.connect();
278
+ testFable.services.DatabaseService.commit('Another Test Record');
279
279
 
280
- Expect(testFable.serviceManager.services.DatabaseService.Hash).to.equal('PrimaryConnection');
280
+ Expect(testFable.services.DatabaseService.Hash).to.equal('PrimaryConnection');
281
281
  }
282
282
  );
283
283
  }
@@ -32,7 +32,7 @@ suite
32
32
  function(fTestComplete)
33
33
  {
34
34
  let testFable = new libFable();
35
- let tmpFilePersistence = testFable.serviceManager.instantiateServiceProvider('FilePersistence');
35
+ let tmpFilePersistence = testFable.instantiateServiceProvider('FilePersistence');
36
36
  Expect(tmpFilePersistence).is.an('object');
37
37
  Expect(tmpFilePersistence.existsSync(`${__dirname}/../package.json`)).to.equal(true);
38
38
  Expect(tmpFilePersistence.existsSync(`${__dirname}/package.json`)).to.equal(false);
@@ -45,7 +45,7 @@ suite
45
45
  function(fTestComplete)
46
46
  {
47
47
  let testFable = new libFable();
48
- let tmpFilePersistence = testFable.serviceManager.instantiateServiceProvider('FilePersistence');
48
+ let tmpFilePersistence = testFable.instantiateServiceProvider('FilePersistence');
49
49
  let tmpFirstLine = 'id,book_id,best_book_id,work_id,books_count,isbn,isbn13,authors,original_publication_year,original_title,title,language_code,average_rating,ratings_count,work_ratings_count,work_text_reviews_count,ratings_1,ratings_2,ratings_3,ratings_4,ratings_5,image_url,small_image_url';
50
50
 
51
51
  let tmpLineReader = tmpFilePersistence.lineReaderFactory(`${__dirname}/data/books.csv`,
@@ -80,8 +80,8 @@ suite
80
80
  function(fTestComplete)
81
81
  {
82
82
  let testFable = new libFable();
83
- let tmpFilePersistence = testFable.serviceManager.instantiateServiceProvider('FilePersistence');
84
- let tmpDataGeneration = testFable.serviceManager.instantiateServiceProvider('DataGeneration');
83
+ let tmpFilePersistence = testFable.instantiateServiceProvider('FilePersistence');
84
+ let tmpDataGeneration = testFable.instantiateServiceProvider('DataGeneration');
85
85
 
86
86
  let tmpLogFilePath = `/tmp/Fable-Test-${tmpDataGeneration.randomNumericString()}.log`;
87
87
  testFable.log.info(`Writing test log file: [${tmpLogFilePath}]`);
@@ -107,7 +107,7 @@ suite
107
107
  function(fTestComplete)
108
108
  {
109
109
  let testFable = new libFable();
110
- let tmpFilePersistence = testFable.serviceManager.instantiateServiceProvider('FilePersistence');
110
+ let tmpFilePersistence = testFable.instantiateServiceProvider('FilePersistence');
111
111
 
112
112
  Expect(tmpFilePersistence.joinPath('/tmp/tests/../othertests/names/'))
113
113
  .to.equal('/tmp/othertests/names');
@@ -121,8 +121,8 @@ suite
121
121
  function(fTestComplete)
122
122
  {
123
123
  let testFable = new libFable();
124
- let tmpFilePersistence = testFable.serviceManager.instantiateServiceProvider('FilePersistence');
125
- let tmpDataGeneration = testFable.serviceManager.instantiateServiceProvider('DataGeneration');
124
+ let tmpFilePersistence = testFable.instantiateServiceProvider('FilePersistence');
125
+ let tmpDataGeneration = testFable.instantiateServiceProvider('DataGeneration');
126
126
 
127
127
  let tmpFolderExtras = [];
128
128
 
@@ -154,8 +154,8 @@ suite
154
154
  function(fTestComplete)
155
155
  {
156
156
  let testFable = new libFable();
157
- let tmpFilePersistence = testFable.serviceManager.instantiateServiceProvider('FilePersistence');
158
- let tmpDataGeneration = testFable.serviceManager.instantiateServiceProvider('DataGeneration');
157
+ let tmpFilePersistence = testFable.instantiateServiceProvider('FilePersistence');
158
+ let tmpDataGeneration = testFable.instantiateServiceProvider('DataGeneration');
159
159
 
160
160
  let tmpLogFilePath = `/tmp/Fable-Test-${tmpDataGeneration.randomNumericString()}.log`;
161
161
  testFable.log.info(`Writing test log file: [${tmpLogFilePath}]`);
@@ -28,7 +28,7 @@ suite
28
28
  {
29
29
  let testFable = new libFable();
30
30
 
31
- let animalManyfest = testFable.serviceManager.instantiateServiceProvider('Manifest',
31
+ let animalManyfest = testFable.instantiateServiceProvider('Manifest',
32
32
  {
33
33
  "Scope": "Animal",
34
34
  "Descriptors":
@@ -15,7 +15,7 @@ const Expect = Chai.expect;
15
15
  const loadMetaTemplateModule = () =>
16
16
  {
17
17
  let tmpFable = new libFable();
18
- return tmpFable.serviceManager.instantiateServiceProviderWithoutRegistration('MetaTemplate', {});
18
+ return tmpFable.instantiateServiceProviderWithoutRegistration('MetaTemplate', {});
19
19
  };
20
20
 
21
21
  const configMetaTemplate = (pModule) =>
@@ -35,7 +35,7 @@ suite
35
35
  {
36
36
  let testFable = new libFable();
37
37
  // Instantiate the RestClient Service Provider
38
- let tmpRestClient = testFable.serviceManager.instantiateServiceProvider('RestClient', { TraceLog: true }, 'RestClient-99');
38
+ let tmpRestClient = testFable.instantiateServiceProvider('RestClient', { TraceLog: true }, 'RestClient-99');
39
39
 
40
40
  // Download the wiktionary entry for dog!
41
41
  tmpRestClient.getJSON('http://localhost:8086/1.0/Author/1',
@@ -55,7 +55,7 @@ suite
55
55
  {
56
56
  let testFable = new libFable();
57
57
  // Instantiate the RestClient Service Provider
58
- let tmpRestClient = testFable.serviceManager.instantiateServiceProvider('RestClient', { TraceLog: true }, 'RestClient-99');
58
+ let tmpRestClient = testFable.instantiateServiceProvider('RestClient', { TraceLog: true }, 'RestClient-99');
59
59
 
60
60
  tmpRestClient.prepareRequestOptions = (pOptions) =>
61
61
  {
@@ -81,14 +81,14 @@ suite
81
81
  {
82
82
  let testFable = new libFable();
83
83
  // Instantiate the RestClient Service Provider
84
- let tmpRestClient = testFable.serviceManager.instantiateServiceProvider('RestClient', { TraceLog: true }, 'RestClient-99');
84
+ let tmpRestClient = testFable.instantiateServiceProvider('RestClient', { TraceLog: true }, 'RestClient-99');
85
85
 
86
86
  // Download the wiktionary entry for dog!
87
87
  tmpRestClient.executeChunkedRequestBinary({ url: 'http://localhost:8086/1.0/Author/1', method: 'GET' },
88
88
  (pError, pResponse, pBuffer) =>
89
89
  {
90
90
  Expect(pBuffer).to.be.instanceof(Buffer);
91
- testFable.serviceManager.instantiateServiceProvider('FilePersistence');
91
+ testFable.instantiateServiceProvider('FilePersistence');
92
92
  // TODO: How to test this on all operating systems safely?
93
93
  //testFable.FilePersistence.writeFileSync(`/tmp/RestClient_binary_test.jpg`, pBuffer);
94
94
  fTestComplete();
@@ -102,7 +102,7 @@ suite
102
102
  {
103
103
  let testFable = new libFable();
104
104
  // Instantiate the RestClient Service Provider
105
- let tmpRestClient = testFable.serviceManager.instantiateServiceProvider('RestClient', { TraceLog: true }, 'RestClient-99');
105
+ let tmpRestClient = testFable.instantiateServiceProvider('RestClient', { TraceLog: true }, 'RestClient-99');
106
106
 
107
107
  // Download the wiktionary entry for dog!
108
108
  tmpRestClient.putJSON({ url: 'http://localhost:8086/1.0/Author/Upsert', body: { GUIDAuthor: 'TestAuthor', Name: 'Test Author 2' } },
@@ -122,7 +122,7 @@ suite
122
122
  {
123
123
  let testFable = new libFable();
124
124
  // Instantiate the RestClient Service Provider
125
- let tmpRestClient = testFable.serviceManager.instantiateServiceProvider('RestClient', { TraceLog: true }, 'RestClient-99');
125
+ let tmpRestClient = testFable.instantiateServiceProvider('RestClient', { TraceLog: true }, 'RestClient-99');
126
126
 
127
127
  // Download the wiktionary entry for dog!
128
128
  tmpRestClient.putJSON({ url: 'http://localhost:8086/1.0/Author/Upsert', body: { Name: 'Test Author 2 DELETE' } },