Mercurial > dive4elements > gnv-client
changeset 111:065ec0a29394
Integrate the type Point into the ArtifactMethod.
Integrate Responstest for feed-Requests into the JUnitTest
gnv-artifacts/trunk@160 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 29 Sep 2009 15:30:03 +0000 |
parents | b465f1bbe368 |
children | b8dbf39ca935 |
files | gnv-artifacts/Changelog gnv-artifacts/pom.xml gnv-artifacts/src/main/java/de/intevation/gnv/utils/InputValidator.java gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java gnv-artifacts/src/test/ressources/conf.xml |
diffstat | 5 files changed, 23 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gnv-artifacts/Changelog Tue Sep 29 15:02:27 2009 +0000 +++ b/gnv-artifacts/Changelog Tue Sep 29 15:30:03 2009 +0000 @@ -1,3 +1,15 @@ +2009-09-29 Tim Englich <tim.englich@intevation.de> + + * src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java (doNextStep) Edited: + Add Responsevalidation for feed-Requests. + * pom.xml Edited: + Add required Library ORO to the Dependencies which is required by Commons-Validator + to do matchRegexp Requests. + * src/main/java/de/intevation/gnv/utils/InputValidator.java (isInputValid) Edited: + Add a Validator for the type Point + * src/test/ressources/conf.xml Edited: + Changed mesh_coordinate from type Integer to type Point + 2009-09-29 Tim Englich <tim.englich@intevation.de> * src/main/java/de/intevation/gnv/chart/VerticalProfileChartFactory.java (findValueTitle):
--- a/gnv-artifacts/pom.xml Tue Sep 29 15:02:27 2009 +0000 +++ b/gnv-artifacts/pom.xml Tue Sep 29 15:30:03 2009 +0000 @@ -72,5 +72,10 @@ <artifactId>commons-validator</artifactId> <version>1.3.1</version> </dependency> + <dependency> + <groupId>oro</groupId> + <artifactId>oro</artifactId> + <version>2.0.8</version> + </dependency> </dependencies> </project>
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/utils/InputValidator.java Tue Sep 29 15:02:27 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/utils/InputValidator.java Tue Sep 29 15:30:03 2009 +0000 @@ -33,9 +33,11 @@ if ("Integer".equalsIgnoreCase(type)){ valid = org.apache.commons.validator.GenericValidator.isInt(values[i].trim()); }else if ("String".equalsIgnoreCase(type)){ - valid = org.apache.commons.validator.GenericValidator.matchRegexp(values[i], "[a-zA-Z0-9]"); + valid = org.apache.commons.validator.GenericValidator.matchRegexp(values[i], "[a-zA-Z0-9]"); // TODO: FIXME: VALIDATE REGEXP }else if ("Date".equalsIgnoreCase(type)){ valid = org.apache.commons.validator.GenericValidator.isDate(values[i].trim(), DateUtils.DATE_PATTERN, true); + }else if ("Point".equalsIgnoreCase(type)){ + valid = org.apache.commons.validator.GenericValidator.matchRegexp(values[i], "[0-9]"); // TODO: FIXME: VALIDATE REGEXP }else{ valid = false; }
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Tue Sep 29 15:02:27 2009 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java Tue Sep 29 15:30:03 2009 +0000 @@ -136,7 +136,8 @@ private void doNextStep(Artifact artifact, CallContext cc, String feedDocument, String advanceDocument) throws Exception { Document outputData = artifact.describe(null); this.writeDocument2Log(outputData); - artifact.feed(this.readDocument(feedDocument), cc); + outputData = artifact.feed(this.readDocument(feedDocument), cc); + this.check4ExceptionReport(outputData); outputData = artifact.advance(this.readDocument(advanceDocument), cc); this.writeDocument2Log(outputData); this.check4ExceptionReport(outputData);
--- a/gnv-artifacts/src/test/ressources/conf.xml Tue Sep 29 15:02:27 2009 +0000 +++ b/gnv-artifacts/src/test/ressources/conf.xml Tue Sep 29 15:30:03 2009 +0000 @@ -129,7 +129,7 @@ </reachableTransitions> <inputvalues> <inputvalue name="featureid" type="Integer" multiselect="false"/> - <inputvalue name="mesh_coordinate" type="Integer" multiselect="false" usedinquery="0"/> + <inputvalue name="mesh_coordinate" type="Point" multiselect="false" usedinquery="0"/> </inputvalues> </transition>