mirror of
https://github.com/nasa/openmct.git
synced 2025-04-15 23:16:46 +00:00
[Timeline] Add more objects to test case
This commit is contained in:
parent
40895ec1b9
commit
9e6e33983b
@ -28,8 +28,29 @@ define(
|
||||
var mockDomainObjects,
|
||||
exporter;
|
||||
|
||||
function makeMockDomainObject(model, index) {
|
||||
var mockDomainObject = jasmine.createSpyObj(
|
||||
'domainObject-' + index,
|
||||
[
|
||||
'getId',
|
||||
'getCapability',
|
||||
'useCapability',
|
||||
'hasCapability',
|
||||
'getModel'
|
||||
]
|
||||
);
|
||||
mockDomainObject.getId.andReturn('id-' + index);
|
||||
mockDomainObject.getModel.andReturn(model);
|
||||
return mockDomainObject;
|
||||
}
|
||||
|
||||
beforeEach(function () {
|
||||
mockDomainObjects = [];
|
||||
mockDomainObjects = [
|
||||
{ composition: [ 'a', 'b', 'c' ] },
|
||||
{ relationships: { modes: [ 'x', 'y' ] } },
|
||||
{ }
|
||||
].map(makeMockDomainObject);
|
||||
|
||||
exporter = new TimelineCSVExporter(mockDomainObjects);
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user