Mercurial > dive4elements > gnv-client
changeset 595:e0d7b8a0bc42
Compilance-Errors triggered by Interface-Modifications in the Artifact-Module.
Some Refactoringwork affecting the JunitTest-Classes done.
gnv-artifacts/trunk@651 c6561f87-3c4e-4783-a992-168aeb5c3f6f
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog Mon Feb 01 14:03:01 2010 +0000 +++ b/gnv-artifacts/ChangeLog Mon Feb 01 14:14:19 2010 +0000 @@ -1,3 +1,25 @@ +2010-02-01 Tim Englich <tim.englich@intevation.de> + + * src/test/java/de/intevation/gnv/artifacts/TestArtifactDatabase.java (createArtifactWithFactory): + Fixed Compilance-Errors triggered by Interface-Modifications in the + Artifact-Module. + + * src/test/java/de/intevation/gnv/artifacts/TimeSeriesPointVerticalProfileTestCase.java (testArtifact), + * src/test/java/de/intevation/gnv/artifacts/TimeSeriesPointTimeSeriesTestCase.java (testArtifact), + * src/test/java/de/intevation/gnv/artifacts/MeshVerticalProfileTestCase.java (testArtifact), + * src/test/java/de/intevation/gnv/artifacts/MeshVerticalCrossSectionTestCase.java (testArtifact), + * src/test/java/de/intevation/gnv/artifacts/MeshTimeSeriesTestCase.java (testArtifact), + * src/test/java/de/intevation/gnv/artifacts/MeshHorizontalProfileTestCase.java (testArtifact), + * src/test/java/de/intevation/gnv/artifacts/MeshHorizontalCrossSectionTestCase.java (testArtifact), + * src/test/java/de/intevation/gnv/artifacts/InstantaneousPointVerticalProfileTestCase.java (testArtifact), + * src/test/java/de/intevation/gnv/artifacts/InstantaneousPointHorizontalProfileTestCase.java (testArtifact): + Refactored Artifact-Instantiation using the new createArtifact()-Method of the super-Class. + + * src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCaseBase.java (createArtifact) + Added Method for instantiating an new Artifact using the given Artifactfactory. + Also fixed the Compilance-Errors triggered by Interface-Modifications in the + Artifact-Module. + 2010-02-01 Tim Englich <tim.englich@intevation.de> * src/main/java/de/intevation/gnv/timeseries/TimeSeriesArtifact.java (setup),
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCaseBase.java Mon Feb 01 14:03:01 2010 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/GNVArtifactsTestCaseBase.java Mon Feb 01 14:14:19 2010 +0000 @@ -172,6 +172,20 @@ return null; } + /** + * @param artifactFactory + * @return + */ + protected Artifact createArtifact(ArtifactFactory artifactFactory) { + Document setupData = null; + Artifact artifact = artifactFactory.createArtifact( + "" + System.currentTimeMillis(), + bootstrap.getContext(), + setupData); + assertNotNull(artifact); + log.debug("Artifact is available"); + return artifact; + } }
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/InstantaneousPointHorizontalProfileTestCase.java Mon Feb 01 14:03:01 2010 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/InstantaneousPointHorizontalProfileTestCase.java Mon Feb 01 14:14:19 2010 +0000 @@ -48,10 +48,8 @@ .getArtifactFactory(artefactName); assertNotNull(artifactFactory); log.debug("VerticalProfile-ArtifactFactory is available"); - Artifact artifact = artifactFactory.createArtifact( - "" + System.currentTimeMillis(), bootstrap.getContext()); - assertNotNull(artifact); - log.debug("VerticalProfile-Artifact is available"); + + Artifact artifact = createArtifact(artifactFactory); CallContext cc = createCallContext(artifactFactory); Document describeDocument = this.readDocument("src/test/ressources/horizontalProfile_instantaneouspoint/horizontalprofile_describe.xml");
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/InstantaneousPointVerticalProfileTestCase.java Mon Feb 01 14:03:01 2010 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/InstantaneousPointVerticalProfileTestCase.java Mon Feb 01 14:14:19 2010 +0000 @@ -47,10 +47,8 @@ .getArtifactFactory(artefactName); assertNotNull(artifactFactory); log.debug("VerticalProfile-ArtifactFactory is available"); - Artifact artifact = artifactFactory.createArtifact( - "" + System.currentTimeMillis(), bootstrap.getContext()); - assertNotNull(artifact); - log.debug("VerticalProfile-Artifact is available"); + + Artifact artifact = createArtifact(artifactFactory); CallContext cc = createCallContext(artifactFactory); Document describeDocument = this.readDocument("src/test/ressources/verticalprofile_instantaneouspoint/verticalprofile_describe.xml");
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/MeshHorizontalCrossSectionTestCase.java Mon Feb 01 14:03:01 2010 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/MeshHorizontalCrossSectionTestCase.java Mon Feb 01 14:14:19 2010 +0000 @@ -47,10 +47,8 @@ .getArtifactFactory(artefactName); assertNotNull(artifactFactory); log.debug("HorizontalCrossSectionMesh-ArtifactFactory is available"); - Artifact artifact = artifactFactory.createArtifact( - "" + System.currentTimeMillis(), bootstrap.getContext()); - assertNotNull(artifact); - log.debug("HorizontalCrossSectionMesh-Artifact is available"); + + Artifact artifact = createArtifact(artifactFactory); CallContext cc = createCallContext(artifactFactory); Document describeDocument = this.readDocument("src/test/ressources/horizontalcrosssection_mesh/horizontalcrosssection_describe.xml");
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/MeshHorizontalProfileTestCase.java Mon Feb 01 14:03:01 2010 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/MeshHorizontalProfileTestCase.java Mon Feb 01 14:14:19 2010 +0000 @@ -47,10 +47,8 @@ .getArtifactFactory(artefactName); assertNotNull(artifactFactory); log.debug("VerticalProfile-ArtifactFactory is available"); - Artifact artifact = artifactFactory.createArtifact( - "" + System.currentTimeMillis(), bootstrap.getContext()); - assertNotNull(artifact); - log.debug("VerticalProfile-Artifact is available"); + + Artifact artifact = createArtifact(artifactFactory); CallContext cc = createCallContext(artifactFactory); Document describeDocument = this.readDocument("src/test/ressources/horizontalProfile_mesh/horizontalprofile_describe.xml");
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/MeshTimeSeriesTestCase.java Mon Feb 01 14:03:01 2010 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/MeshTimeSeriesTestCase.java Mon Feb 01 14:14:19 2010 +0000 @@ -46,10 +46,8 @@ .getArtifactFactory(artefactName); assertNotNull(artifactFactory); log.debug("TimeSeriesMesh-ArtifactFactory is available"); - Artifact artifact = artifactFactory.createArtifact( - "" + System.currentTimeMillis(), bootstrap.getContext()); - assertNotNull(artifact); - log.debug("TimeSeriesMesh-Artifact is available"); + + Artifact artifact = createArtifact(artifactFactory); CallContext cc = createCallContext(artifactFactory);
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/MeshVerticalCrossSectionTestCase.java Mon Feb 01 14:03:01 2010 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/MeshVerticalCrossSectionTestCase.java Mon Feb 01 14:14:19 2010 +0000 @@ -47,10 +47,8 @@ .getArtifactFactory(artefactName); assertNotNull(artifactFactory); log.debug("VerticalProfile-ArtifactFactory is available"); - Artifact artifact = artifactFactory.createArtifact( - "" + System.currentTimeMillis(), bootstrap.getContext()); - assertNotNull(artifact); - log.debug("VerticalProfile-Artifact is available"); + + Artifact artifact = createArtifact(artifactFactory); CallContext cc = createCallContext(artifactFactory); Document describeDocument = this.readDocument("src/test/ressources/verticalcrosssection_mesh/verticalcrosssection_describe.xml");
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/MeshVerticalProfileTestCase.java Mon Feb 01 14:03:01 2010 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/MeshVerticalProfileTestCase.java Mon Feb 01 14:14:19 2010 +0000 @@ -46,10 +46,8 @@ .getArtifactFactory(artefactName); assertNotNull(artifactFactory); log.debug("VerticalProfile-ArtifactFactory is available"); - Artifact artifact = artifactFactory.createArtifact( - "" + System.currentTimeMillis(), bootstrap.getContext()); - assertNotNull(artifact); - log.debug("VerticalProfile-Artifact is available"); + + Artifact artifact = createArtifact(artifactFactory); CallContext cc = createCallContext(artifactFactory); Document describeDocument = this.readDocument("src/test/ressources/" +
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestArtifactDatabase.java Mon Feb 01 14:03:01 2010 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TestArtifactDatabase.java Mon Feb 01 14:14:19 2010 +0000 @@ -42,9 +42,11 @@ } /** - * @see de.intevation.artifacts.ArtifactDatabase#createArtifactWithFactory(java.lang.String, de.intevation.artifacts.CallMeta) + * @see de.intevation.artifacts.ArtifactDatabase#createArtifactWithFactory(java.lang.String, de.intevation.artifacts.CallMeta, org.w3c.dom.Document) */ - public Document createArtifactWithFactory(String factory, CallMeta callMeta) + public Document createArtifactWithFactory(String factory, + CallMeta callMeta, + Document data) throws ArtifactDatabaseException { return null;
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TimeSeriesPointTimeSeriesTestCase.java Mon Feb 01 14:03:01 2010 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TimeSeriesPointTimeSeriesTestCase.java Mon Feb 01 14:14:19 2010 +0000 @@ -50,10 +50,8 @@ .getArtifactFactory(artefactName); assertNotNull(artifactFactory); log.debug("TimeSeries-ArtifactFactory is available"); - Artifact artifact = artifactFactory.createArtifact( - "" + System.currentTimeMillis(), bootstrap.getContext()); - assertNotNull(artifact); - log.debug("TimeSeries-Artifact is available"); + + Artifact artifact = createArtifact(artifactFactory); CallContext cc = createCallContext(artifactFactory);
--- a/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TimeSeriesPointVerticalProfileTestCase.java Mon Feb 01 14:03:01 2010 +0000 +++ b/gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/TimeSeriesPointVerticalProfileTestCase.java Mon Feb 01 14:14:19 2010 +0000 @@ -47,10 +47,8 @@ .getArtifactFactory(artefactName); assertNotNull(artifactFactory); log.debug("VerticalProfile-ArtifactFactory is available"); - Artifact artifact = artifactFactory.createArtifact( - "" + System.currentTimeMillis(), bootstrap.getContext()); - assertNotNull(artifact); - log.debug("VerticalProfile-Artifact is available"); + + Artifact artifact = createArtifact(artifactFactory); CallContext cc = createCallContext(artifactFactory);