-
Notifications
You must be signed in to change notification settings - Fork 287
Expand file tree
/
Copy pathImageGFAspectSpec.js
More file actions
35 lines (28 loc) · 934 Bytes
/
ImageGFAspectSpec.js
File metadata and controls
35 lines (28 loc) · 934 Bytes
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
import { ImageGFAspect } from '@supermapgis/iclient-common/iServer';
var option = {
"girdFuncName": "GFAspect",
"Azimuth": 360
}
describe('ImageGFAspect', () => {
it('constructor destroy', () => {
var parameter = new ImageGFAspect(option);
expect(parameter.girdFuncName).toEqual("GFAspect");
expect(parameter.Azimuth).toEqual(360);
expect(parameter.CLASS_NAME).toEqual('SuperMap.ImageGFAspect');
parameter.destroy();
expect(parameter.girdFuncName).toEqual('GFAspect');
expect(parameter.Azimuth).toEqual(undefined);
});
it('constructFromObject', () => {
var obj = ImageGFAspect.constructFromObject(option);
var res = obj instanceof ImageGFAspect;
expect(res).toBeTruthy();
})
it('constructFromObject other key', () => {
var data = {
'test':'test'
}
var obj = ImageGFAspect.constructFromObject(data);
expect(obj.hasOwnProperty('test')).toBeFalsy();
})
});