[Timeline] Add more objects to test case
This commit is contained in:
@@ -28,8 +28,29 @@ define(
|
|||||||
var mockDomainObjects,
|
var mockDomainObjects,
|
||||||
exporter;
|
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 () {
|
beforeEach(function () {
|
||||||
mockDomainObjects = [];
|
mockDomainObjects = [
|
||||||
|
{ composition: [ 'a', 'b', 'c' ] },
|
||||||
|
{ relationships: { modes: [ 'x', 'y' ] } },
|
||||||
|
{ }
|
||||||
|
].map(makeMockDomainObject);
|
||||||
|
|
||||||
exporter = new TimelineCSVExporter(mockDomainObjects);
|
exporter = new TimelineCSVExporter(mockDomainObjects);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user