-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests(ws): remove toolbar files, and create each function test file
- Loading branch information
1 parent
20683f0
commit 425440e
Showing
12 changed files
with
193 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
This file is part of Giswater 3 | ||
The program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
This version of Giswater is provided by Giswater Association | ||
*/ | ||
BEGIN; | ||
|
||
SET search_path = "SCHEMA_NAME", public, pg_catalog; | ||
|
||
-- Plan for 2 test | ||
SELECT plan(2); | ||
|
||
-- Extract and test the "status" field from the function's JSON response | ||
SELECT is ( | ||
(gw_fct_anl_arc_length($${"client":{"device":4, "infoType":1, "lang":"ES"}, "form":{},"feature":{"tableName":"v_edit_arc", | ||
"featureType":"ARC", "id":[2001,2002]}, "data":{"selectionMode":"previousSelection","parameters":{"arcLength":"3"}}}$$)::JSON)->>'status', | ||
'Accepted', | ||
'Check if gw_fct_anl_arc_length -> previousSelection returns status "Accepted"' | ||
); | ||
|
||
|
||
SELECT is ( | ||
(gw_fct_anl_arc_length($${"client":{"device":4, "infoType":1, "lang":"ES"},"form":{},"feature":{"tableName":"v_edit_arc", | ||
"featureType":"ARC", "id":[]}, "data":{"selectionMode":"wholeSelection","parameters":{"arcLength":"3"}}}$$)::JSON)->>'status', | ||
'Accepted', | ||
'Check if gw_fct_anl_arc_length -> wholeSelection returns status "Accepted"' | ||
); | ||
|
||
|
||
-- Finish the test | ||
SELECT finish(); | ||
|
||
ROLLBACK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
This file is part of Giswater 3 | ||
The program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
This version of Giswater is provided by Giswater Association | ||
*/ | ||
BEGIN; | ||
|
||
SET search_path = "SCHEMA_NAME", public, pg_catalog; | ||
|
||
-- Plan for 1 test | ||
SELECT plan(1); | ||
|
||
-- Extract and test the "status" field from the function's JSON response | ||
SELECT is ( | ||
(gw_fct_anl_arc_no_startend_node($${"client":{"device":4, "infoType":1, "lang":"ES"}, "feature":{"tableName":"v_edit_arc", | ||
"featureType":"ARC"}, "data":{"parameters":{"arcSearchNodes":"0.1"}}}$$)::JSON)->>'status', | ||
'Accepted', | ||
'Check if gw_fct_anl_arc_no_startend_node returns status "Accepted"' | ||
); | ||
|
||
-- Finish the test | ||
SELECT finish(); | ||
|
||
ROLLBACK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
This file is part of Giswater 3 | ||
The program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
This version of Giswater is provided by Giswater Association | ||
*/ | ||
BEGIN; | ||
|
||
SET search_path = "SCHEMA_NAME", public, pg_catalog; | ||
|
||
-- Plan for 2 test | ||
SELECT plan(2); | ||
|
||
-- Extract and test the "status" field from the function's JSON response | ||
SELECT is ( | ||
(gw_fct_anl_arc_same_startend($${"client":{"device":4, "infoType":1, "lang":"ES"}, | ||
"feature":{"tableName":"v_edit_arc", "id":[2001,2002]}, "data":{"selectionMode":"previousSelection","parameters":{}}}$$)::JSON)->>'status', | ||
'Accepted', | ||
'Check if gw_fct_anl_arc_same_startend -> previousSelection returns status "Accepted"' | ||
); | ||
|
||
SELECT is ( | ||
(gw_fct_anl_arc_same_startend($${"client":{"device":4, "infoType":1, "lang":"ES"}, | ||
"feature":{"tableName":"v_edit_arc"}, "data":{"selectionMode":"wholeSelection","parameters":{}}}$$)::JSON)->>'status', | ||
'Accepted', | ||
'Check if gw_fct_anl_arc_same_startend -> wholeSelection returns status "Accepted"' | ||
); | ||
|
||
|
||
-- Finish the test | ||
SELECT finish(); | ||
|
||
ROLLBACK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
This file is part of Giswater 3 | ||
The program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
This version of Giswater is provided by Giswater Association | ||
*/ | ||
BEGIN; | ||
|
||
SET search_path = "SCHEMA_NAME", public, pg_catalog; | ||
|
||
-- Plan for 2 test | ||
SELECT plan(2); | ||
|
||
-- Extract and test the "status" field from the function's JSON response | ||
SELECT is ( | ||
(gw_fct_anl_connec_duplicated($${"client":{"device":4, "infoType":1, "lang":"ES"},"feature":{"tableName":"v_edit_connec"}, | ||
"data":{"selectionMode":"wholeSelection", "parameters":{"connecTolerance":10}, "parameters":{}}}$$)::JSON)->>'status', | ||
'Accepted', | ||
'Check if gw_fct_anl_connec_duplicated -> wholeSelection returns status "Accepted"' | ||
); | ||
|
||
SELECT is ( | ||
(gw_fct_anl_connec_duplicated($${"client":{"device":4, "infoType":1, "lang":"ES"},"feature":{"tableName":"v_edit_connec", | ||
"id":[3101, 3102]}, "data":{"selectionMode":"previousSelection", "parameters":{"connecTolerance":10}, "parameters":{}}}$$)::JSON)->>'status', | ||
'Accepted', | ||
'Check if gw_fct_anl_connec_duplicated -> previousSelection returns status "Accepted"' | ||
); | ||
|
||
|
||
-- Finish the test | ||
SELECT finish(); | ||
|
||
ROLLBACK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
This file is part of Giswater 3 | ||
The program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
This version of Giswater is provided by Giswater Association | ||
*/ | ||
BEGIN; | ||
|
||
SET search_path = "SCHEMA_NAME", public, pg_catalog; | ||
|
||
-- gw_fct_pg2epa_main | ||
-- SELECT gw_fct_pg2epa_main($${"client":{"device":4, "infoType":1, "lang":"ES", "epsg":25831}, "data":{"resultId":"test1", "step":"1"}}$$); | ||
-- SELECT gw_fct_pg2epa_main($${"client":{"device":4, "infoType":1, "lang":"ES", "epsg":25831}, "data":{"resultId":"test1", "step":"2"}}$$); | ||
-- SELECT gw_fct_pg2epa_main($${"client":{"device":4, "infoType":1, "lang":"ES", "epsg":25831}, "data":{"resultId":"test1", "step":"3"}}$$); | ||
-- SELECT gw_fct_pg2epa_main($${"client":{"device":4, "infoType":1, "lang":"ES", "epsg":25831}, "data":{"resultId":"test1", "step":"4"}}$$); | ||
-- SELECT gw_fct_pg2epa_main($${"client":{"device":4, "infoType":1, "lang":"ES", "epsg":25831}, "data":{"resultId":"test1", "step":"5"}}$$); | ||
-- SELECT gw_fct_pg2epa_main($${"client":{"device":4, "infoType":1, "lang":"ES", "epsg":25831}, "data":{"resultId":"test1", "step":"6"}}$$); | ||
-- SELECT gw_fct_pg2epa_main($${"client":{"device":4, "infoType":1, "lang":"ES", "epsg":25831}, "data":{"resultId":"test1", "step":"7"}}$$); | ||
|
||
-- Finish the test | ||
SELECT finish(); | ||
|
||
ROLLBACK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
This file is part of Giswater 3 | ||
The program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
This version of Giswater is provided by Giswater Association | ||
*/ | ||
BEGIN; | ||
|
||
SET search_path = "SCHEMA_NAME", public, pg_catalog; | ||
|
||
-- gw_fct_setlinktonetwork | ||
-- SELECT gw_fct_setlinktonetwork($${"client":{"device":4, "infoType":1, "lang":"ES"}, | ||
-- "feature":{"id":["3201","3200"]},"data":{"feature_type":"CONNEC", "forcedArcs":["2001","2002"]}}$$); | ||
|
||
-- SELECT gw_fct_setlinktonetwork($${"client":{"device":4, "infoType":1, "lang":"ES"}, | ||
-- "feature":{"id":["100013"]},"data":{"feature_type":"CONNEC"}}$$); | ||
|
||
-- SELECT gw_fct_setlinktonetwork($${"client":{"device":4, "infoType":1, "lang":"ES"}, | ||
-- "feature":{"id":["100014"]},"data":{"feature_type":"GULLY"}}$$); | ||
|
||
-- Finish the test | ||
SELECT finish(); | ||
|
||
ROLLBACK; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.