forked from CesiumGS/cesium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMockDataSource.js
46 lines (38 loc) · 1.17 KB
/
MockDataSource.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*global define*/
define(['Core/Event',
'DynamicScene/DynamicObjectCollection'
], function(
Event,
DynamicObjectCollection) {
"use strict";
var MockDataSource = function() {
//Values to be fiddled with by the test
this.changedEvent = new Event();
this.errorEvent = new Event();
this.clock = undefined;
this.dynamicObjectCollection = new DynamicObjectCollection();
this.isTimeVarying = false;
this.destroyed = false;
var that = this;
//The actual DataSource interface.
this.getChangedEvent = function() {
return that.changedEvent;
};
this.getErrorEvent = function() {
return that.errorEvent;
};
this.getClock = function() {
return that.clock;
};
this.getDynamicObjectCollection = function() {
return that.dynamicObjectCollection;
};
this.getIsTimeVarying = function() {
return that.isTimeVarying;
};
this.destroy = function() {
that.destroyed = true;
};
};
return MockDataSource;
});