Skip to content

Commit 979a1dd

Browse files
author
Lijun Zhang
committed
DM-6438: add a test to check the projection name
1 parent 9ca5231 commit 979a1dd

File tree

2 files changed

+21
-25
lines changed

2 files changed

+21
-25
lines changed

src/firefly/js/visualize/projection/__test__/ProjectTest.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/firefly/js/visualize/projection/__test__/Projection-test.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,24 @@ const JAVA_TEST_DATA_PATH='firefly_test_data/edu/caltech/ipac/visualize/plot/pro
1414

1515
const precision=10;
1616

17-
1817
var projectionJson={};
1918

19+
20+
const projTypes = {
21+
GNOMONIC : 1001,
22+
ORTHOGRAPHIC : 1002,
23+
NCP : 1003,
24+
AITOFF : 1004,
25+
CAR : 1005,
26+
LINEAR : 1006,
27+
PLATE : 1007,
28+
ARC : 1008,
29+
SFL : 1009,
30+
CEA : 1010,
31+
UNSPECIFIED : 1998,
32+
UNRECOGNIZED : 1999
33+
};
34+
2035
function getJsonFiles(dir){
2136
var fileList = [];
2237

@@ -30,6 +45,7 @@ function getJsonFiles(dir){
3045
}
3146
return fileList;
3247
}
48+
3349
describe('A test suite for projection.js', function () {
3450

3551

@@ -68,6 +84,10 @@ describe('A test suite for projection.js', function () {
6884

6985
if (jsProjection){
7086
console.log('the jsProject is:'+jsProjection.getProjectionName());
87+
var projectionName = jsProjection.getProjectionName();
88+
var maptype = imageHeader.maptype;
89+
expect(projTypes[projectionName]).to.equals(maptype);
90+
7191
}
7292
else {
7393
console.log('jsProject is null');

0 commit comments

Comments
 (0)