mirror of
https://github.com/nasa/openmct.git
synced 2024-12-20 05:37:53 +00:00
[Core] Update spec for CompositionCapability
...to reflect changes to separate out contextualization of domain objects
This commit is contained in:
parent
c4aed57165
commit
bc4c7feb6c
@ -25,8 +25,11 @@
|
||||
* CompositionCapabilitySpec. Created by vwoeltje on 11/6/14.
|
||||
*/
|
||||
define(
|
||||
["../../src/capabilities/CompositionCapability"],
|
||||
function (CompositionCapability) {
|
||||
[
|
||||
"../../src/capabilities/CompositionCapability",
|
||||
"../../src/capabilities/ContextualDomainObject"
|
||||
],
|
||||
function (CompositionCapability, ContextualDomainObject) {
|
||||
"use strict";
|
||||
|
||||
var DOMAIN_OBJECT_METHODS = [
|
||||
@ -40,6 +43,7 @@ define(
|
||||
describe("The composition capability", function () {
|
||||
var mockDomainObject,
|
||||
mockInjector,
|
||||
mockContextualize,
|
||||
mockObjectService,
|
||||
composition;
|
||||
|
||||
@ -70,11 +74,19 @@ define(
|
||||
return (name === "objectService") && mockObjectService;
|
||||
}
|
||||
};
|
||||
mockContextualize = jasmine.createSpy('contextualize');
|
||||
|
||||
// Provide a minimal (e.g. no error-checking) implementation
|
||||
// of contextualize for simplicity
|
||||
mockContextualize.andCallFake(function (domainObject, parentObject) {
|
||||
return new ContextualDomainObject(domainObject, parentObject);
|
||||
});
|
||||
|
||||
mockObjectService.getObjects.andReturn(mockPromise([]));
|
||||
|
||||
composition = new CompositionCapability(
|
||||
mockInjector,
|
||||
mockContextualize,
|
||||
mockDomainObject
|
||||
);
|
||||
});
|
||||
@ -113,4 +125,4 @@ define(
|
||||
|
||||
});
|
||||
}
|
||||
);
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user