Skip to content

Commit

Permalink
feat(webexadapter): add datasource instance property
Browse files Browse the repository at this point in the history
  • Loading branch information
adamweeks committed Aug 16, 2019
1 parent 1577d04 commit d244e13
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/adapters/WebexAdapter.js
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
export default class WebexAdapter {}
export default class WebexAdapter {
/**
* Creates a new instance of the WebexAdapter.
* @param {Object} datasource The primary datasource the adapter will be using.
*/
constructor(datasource) {
this.datasource = datasource;
}
}
18 changes: 18 additions & 0 deletions src/adapters/WebexAdapter.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import WebexAdapter from './WebexAdapter';

describe('Webex Adapter Interface', () => {
let webexAdapter, datasource;

beforeEach(() => {
datasource = 'WebexAdapterDataSource';
webexAdapter = new WebexAdapter(datasource);
});

test('WebexAdapter stores the data source', () => {
expect(webexAdapter.datasource).toBe(datasource);
});

afterEach(() => {
webexAdapter = null;
});
});

0 comments on commit d244e13

Please sign in to comment.