11require ( '../../../src/common/iServer/SurfaceAnalystService' ) ;
22require ( '../../../src/common/util/FetchRequest' ) ;
3- // require('../../resources/SurfaceAnalystServiceResult ');
3+ require ( '../../../src/common/commontypes/Util ' ) ;
44
55var surfaceAnalystEventArgsSystem = null ,
66 serviceFailedEventArgsSystem = null ;
@@ -27,6 +27,7 @@ describe('SurfaceAnalystService', function () {
2727 beforeEach ( function ( ) {
2828 originalTimeout = jasmine . DEFAULT_TIMEOUT_INTERVAL ;
2929 jasmine . DEFAULT_TIMEOUT_INTERVAL = 50000 ;
30+ SuperMap . Util . lastSeqID = 0 ;
3031 } ) ;
3132 afterEach ( function ( ) {
3233 jasmine . DEFAULT_TIMEOUT_INTERVAL = originalTimeout ;
@@ -167,7 +168,7 @@ describe('SurfaceAnalystService', function () {
167168 spyOn ( FetchRequest , 'commit' ) . and . callFake ( function ( method , testUrl , params , options ) {
168169 expect ( method ) . toBe ( 'POST' ) ;
169170 expect ( testUrl ) . toBe ( spatialAnalystURL + "/geometry/isoline.json?returnContent=true" ) ;
170- var expectParams = "{'resolution':3000,'extractParameter':{'clipRegion':null,'datumValue':-3,'expectedZValues':null,'interval':0.5,'resampleTolerance':0.7,'smoothMethod':\"BSPLINE\",'smoothness':3},'resultSetting':{'expectCount':1,'dataset':null,'dataReturnMode':\"RECORDSET_ONLY\",'deleteExistResultDataset':true},'surfaceAnalystMethod':\"ISOLINE\",'points':[{'id':\"SuperMap.Geometry_2\",'bounds':null,'SRID':null,'x':-4000,'y':2000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_3\",'bounds':null,'SRID':null,'x':-4500,'y':2000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_4\",'bounds':null,'SRID':null,'x':-3000,'y':3000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_5\",'bounds':null,'SRID':null,'x':-3000,'y':2000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_6\",'bounds':null,'SRID':null,'x':-2500,'y':2500,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_7\",'bounds':null,'SRID':null,'x':-2000,'y':2000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_8\",'bounds':null,'SRID':null,'x':-2000,'y':3000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_9\",'bounds':null,'SRID':null,'x':-2000,'y':2000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_10\",'bounds':null,'SRID':null,'x':2000,'y':4000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_11\",'bounds':null,'SRID':null,'x':0,'y':0,'tag':null,'type':\"Point\"}],'zValues':[-3,-2,0,-1,-3,0,1,0,1,1]}" ;
171+ var expectParams = "{'resolution':3000,'extractParameter':{'clipRegion':null,'datumValue':-3,'expectedZValues':null,'interval':0.5,'resampleTolerance':0.7,'smoothMethod':\"BSPLINE\",'smoothness':3},'resultSetting':{'expectCount':1,'dataset':null,'dataReturnMode':\"RECORDSET_ONLY\",'deleteExistResultDataset':true},'surfaceAnalystMethod':\"ISOLINE\",'points':[{'id':\"SuperMap.Geometry_1\",'bounds':null,'SRID':null,'x':-4000,'y':2000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_2\",'bounds':null,'SRID':null,'x':-4500,'y':2000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_3\",'bounds':null,'SRID':null,'x':-3000,'y':3000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_4\",'bounds':null,'SRID':null,'x':-3000,'y':2000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_5\",'bounds':null,'SRID':null,'x':-2500,'y':2500,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_6\",'bounds':null,'SRID':null,'x':-2000,'y':2000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_7\",'bounds':null,'SRID':null,'x':-2000,'y':3000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_8\",'bounds':null,'SRID':null,'x':-2000,'y':2000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_9\",'bounds':null,'SRID':null,'x':2000,'y':4000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_10\",'bounds':null,'SRID':null,'x':0,'y':0,'tag':null,'type':\"Point\"}],'zValues':[-3,-2,0,-1,-3,0,1,0,1,1]}" ;
171172 expect ( params ) . toBe ( expectParams ) ;
172173 expect ( options ) . not . toBeNull ( ) ;
173174 return Promise . resolve ( new Response ( surfaceAnalysis_Geometry_ISOLINE ) ) ;
@@ -220,6 +221,8 @@ describe('SurfaceAnalystService', function () {
220221 spyOn ( FetchRequest , 'commit' ) . and . callFake ( function ( method , testUrl , params , options ) {
221222 expect ( method ) . toBe ( 'POST' ) ;
222223 expect ( testUrl ) . toBe ( spatialAnalystURL + "/geometry/isoregion.json?returnContent=true" ) ;
224+ var expectParams = "{'resolution':3000,'extractParameter':{'clipRegion':null,'datumValue':-3,'expectedZValues':null,'interval':0.5,'resampleTolerance':0.7,'smoothMethod':\"BSPLINE\",'smoothness':3},'resultSetting':{'expectCount':1,'dataset':null,'dataReturnMode':\"RECORDSET_ONLY\",'deleteExistResultDataset':true},'surfaceAnalystMethod':\"ISOREGION\",'points':[{'id':\"SuperMap.Geometry_1\",'bounds':null,'SRID':null,'x':-4000,'y':2000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_2\",'bounds':null,'SRID':null,'x':-4500,'y':2000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_3\",'bounds':null,'SRID':null,'x':-3000,'y':3000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_4\",'bounds':null,'SRID':null,'x':-3000,'y':2000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_5\",'bounds':null,'SRID':null,'x':-2500,'y':2500,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_6\",'bounds':null,'SRID':null,'x':-2000,'y':2000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_7\",'bounds':null,'SRID':null,'x':-2000,'y':3000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_8\",'bounds':null,'SRID':null,'x':-2000,'y':2000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_9\",'bounds':null,'SRID':null,'x':2000,'y':4000,'tag':null,'type':\"Point\"},{'id':\"SuperMap.Geometry_10\",'bounds':null,'SRID':null,'x':0,'y':0,'tag':null,'type':\"Point\"}],'zValues':[-3,0,10,20,13,8,5,20,10,15]}" ;
225+ expect ( params ) . toBe ( expectParams ) ;
223226 expect ( options ) . not . toBeNull ( ) ;
224227 return Promise . resolve ( new Response ( surfaceAnalysis_Geometry_ISOREGION ) ) ;
225228 } ) ;
0 commit comments