2015-02-19 20:19:46 +00:00
|
|
|
/*global define,describe,it,expect,beforeEach,jasmine*/
|
|
|
|
|
|
|
|
define(
|
|
|
|
['../../src/elements/TelemetryProxy'],
|
|
|
|
function (TelemetryProxy) {
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
describe("A fixed position telemetry proxy", function () {
|
2015-02-19 21:29:43 +00:00
|
|
|
var testElement,
|
|
|
|
testElements,
|
|
|
|
proxy;
|
2015-02-19 20:19:46 +00:00
|
|
|
|
2015-02-19 21:29:43 +00:00
|
|
|
beforeEach(function () {
|
|
|
|
testElement = {
|
|
|
|
x: 1,
|
|
|
|
y: 2,
|
|
|
|
z: 3,
|
|
|
|
width: 42,
|
|
|
|
height: 24,
|
|
|
|
id: "test-id"
|
|
|
|
};
|
|
|
|
testElements = [ {}, {}, testElement, {} ];
|
|
|
|
proxy = new TelemetryProxy(
|
|
|
|
testElement,
|
|
|
|
testElements.indexOf(testElement),
|
|
|
|
testElements
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("exposes the element's id", function () {
|
|
|
|
expect(proxy.id).toEqual('test-id');
|
|
|
|
});
|
2015-02-19 20:19:46 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
);
|