Splits Adapter loading from AdaptableController

- Adds dynamic prototype conformance check upon setting adapter
- Throws when adapter is undefined, invalid in controller
This commit is contained in:
Florent Vilmart
2016-02-21 23:47:07 -05:00
parent 33fa5a7b2a
commit 23e55e941e
10 changed files with 210 additions and 116 deletions

View File

@@ -76,13 +76,11 @@ describe('LoggerController', () => {
});
it('should throw without an adapter', (done) => {
LoggerController.setDefaultAdapter(undefined);
var loggerController = new LoggerController();
expect(() => {
loggerController.getLogs();
var loggerController = new LoggerController();
}).toThrow();
LoggerController.setDefaultAdapter(FileLoggerAdapter);
done();
});
});