# HG changeset patch # User Tim Englich # Date 1254238203 0 # Node ID 065ec0a29394ec92b29a02642ac6f57e53f03305 # Parent b465f1bbe3681a1a70dffe6a2b8618f3d6205572 Integrate the type Point into the ArtifactMethod. Integrate Responstest for feed-Requests into the JUnitTest gnv-artifacts/trunk@160 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r b465f1bbe368 -r 065ec0a29394 gnv-artifacts/Changelog --- 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 + + * 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 * src/main/java/de/intevation/gnv/chart/VerticalProfileChartFactory.java (findValueTitle): diff -r b465f1bbe368 -r 065ec0a29394 gnv-artifacts/pom.xml --- 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 @@ commons-validator 1.3.1 + + oro + oro + 2.0.8 + diff -r b465f1bbe368 -r 065ec0a29394 gnv-artifacts/src/main/java/de/intevation/gnv/utils/InputValidator.java --- 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; } diff -r b465f1bbe368 -r 065ec0a29394 gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCase.java --- 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); diff -r b465f1bbe368 -r 065ec0a29394 gnv-artifacts/src/test/ressources/conf.xml --- 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 @@ - +