File tree Expand file tree Collapse file tree 4 files changed +79
-1
lines changed
Expand file tree Collapse file tree 4 files changed +79
-1
lines changed Original file line number Diff line number Diff line change 1+ require ( '../../../src/common/iManager/iManagerCreateNodeParam' ) ;
2+
3+ describe ( 'iManagerCreateNodeParam' , function ( ) {
4+ it ( 'constructor' , function ( ) {
5+ var options = {
6+ nodeName : 'test' ,
7+ password : 'test' ,
8+ description : 'test' ,
9+ physicalMachineName : 'physicalMachineNameTest' ,
10+ userName : 'user'
11+ }
12+ var iManagerCreateNodeParam = new SuperMap . iManagerCreateNodeParam ( options ) ;
13+ expect ( iManagerCreateNodeParam ) . not . toBeNull ( ) ;
14+ expect ( iManagerCreateNodeParam . nodeSpec ) . toBe ( 'SMALL' ) ;
15+ expect ( iManagerCreateNodeParam . nodeCount ) . toBe ( 1 ) ;
16+ expect ( iManagerCreateNodeParam . nodeName ) . toBe ( "test" ) ;
17+ expect ( iManagerCreateNodeParam . password ) . toBe ( "test" ) ;
18+ expect ( iManagerCreateNodeParam . description ) . toBe ( "test" ) ;
19+ expect ( iManagerCreateNodeParam . physicalMachineName ) . toBe ( "physicalMachineNameTest" ) ;
20+ expect ( iManagerCreateNodeParam . userName ) . toBe ( "user" ) ;
21+ } )
22+ } ) ;
Original file line number Diff line number Diff line change 1+ require ( '../../../src/common/iServer/LinkItem' ) ;
2+
3+ describe ( 'LinkItem' , function ( ) {
4+ it ( 'constructor, destroy' , function ( ) {
5+ var options = {
6+ foreignKeys : [ "test1" , "test2" ] ,
7+ foreignTable : "test" ,
8+ linkFields : [ "test1" , "test2" ] ,
9+ linkFilter : "test" ,
10+ name : "test" ,
11+ primaryKeys : [ "test1" , "test2" ]
12+ } ;
13+ var linkItem = new SuperMap . LinkItem ( options ) ;
14+ expect ( linkItem . foreignKeys . length ) . toBe ( 2 ) ;
15+ expect ( linkItem . foreignTable ) . toBe ( "test" ) ;
16+ expect ( linkItem . linkFields . length ) . toBe ( 2 ) ;
17+ expect ( linkItem . linkFilter ) . toBe ( "test" ) ;
18+ expect ( linkItem . name ) . toBe ( "test" ) ;
19+ expect ( linkItem . primaryKeys . length ) . toBe ( 2 ) ;
20+ linkItem . destroy ( ) ;
21+ expect ( linkItem . foreignKeys ) . toBeNull ( ) ;
22+ expect ( linkItem . foreignTable ) . toBeNull ( ) ;
23+ expect ( linkItem . linkFields ) . toBeNull ( ) ;
24+ expect ( linkItem . linkFilter ) . toBeNull ( ) ;
25+ expect ( linkItem . name ) . toBeNull ( ) ;
26+ expect ( linkItem . primaryKeys ) . toBeNull ( ) ;
27+ } )
28+ } ) ;
Original file line number Diff line number Diff line change 1+ require ( '../../../../src/common/thirdparty/elasticsearch/ElasticSearch.js' ) ;
2+
3+ describe ( 'ElasticSearch' , function ( ) {
4+ it ( 'constructor, setGeoFence' , function ( ) {
5+ var elasticSearch = new SuperMap . ElasticSearch ( ) ;
6+ expect ( elasticSearch . geoFence ) . toBeNull ( ) ;
7+ var points = [ new SuperMap . Geometry . Point ( 0 , 4010338 ) ,
8+ new SuperMap . Geometry . Point ( 1063524 , 4010338 ) ,
9+ new SuperMap . Geometry . Point ( 1063524 , 3150322 ) ,
10+ new SuperMap . Geometry . Point ( 0 , 3150322 )
11+ ] ;
12+ var linearRings = new SuperMap . Geometry . LinearRing ( points ) ;
13+ var geoFence = new SuperMap . Geometry . Polygon ( [ linearRings ] ) ;
14+ elasticSearch . setGeoFence ( geoFence ) ;
15+ expect ( elasticSearch . geoFence ) . not . toBeNull ( ) ;
16+ expect ( elasticSearch . geoFence . CLASS_NAME ) . toBe ( "SuperMap.Geometry.Polygon" ) ;
17+ expect ( elasticSearch . geoFence . componentTypes ) . not . toBeNull ( ) ;
18+ expect ( elasticSearch . geoFence . components ) . not . toBeNull ( ) ;
19+ expect ( elasticSearch . geoFence . id ) . not . toBeNull ( ) ;
20+ } )
21+ } ) ;
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ require('./common/iServer/ImageSpec.js');
3535require ( './common/iServer/InterpolationAnalystServiceSpec.js' ) ;
3636require ( './common/iServer/LabelImageCellSpec.js' ) ;
3737require ( './common/iServer/LabelMixedStyleSpec.js' ) ;
38+ require ( './common/iServer/LinkItemSpec.js' ) ;
3839require ( './common/iServer/MapServiceSpec.js' ) ;
3940require ( './common/iServer/MathExpressionAnalysisServiceSpec.js' ) ;
4041require ( './common/iServer/MeasureServiceSpec.js' ) ;
@@ -141,6 +142,12 @@ require('./common/online/OnlineDataSpec.js');
141142require ( './common/online/OnlineSpec.js' ) ;
142143require ( './common/online/OnlineQueryDatasParameterSpec' ) ;
143144
145+ /**common -- iManager**/
146+ require ( './common/iManager/iManagerCreateNodeParamSpec.js' ) ;
147+
144148/**common -- iPortal**/
145149require ( './common/iPortal/iPortalMapSpec.js' ) ;
146- require ( './common/iPortal/iPortalServiceSpec.js' ) ;
150+ require ( './common/iPortal/iPortalServiceSpec.js' ) ;
151+
152+ /**common -- thirdparty**/
153+ require ( './common/thirdparty/elasticsearch/ElasticSearchSpec.js' ) ;
You can’t perform that action at this time.
0 commit comments