changeset 10:e6c47838eee6

Added "Create Artifact" and "Describe Artifact" to the Testszenario. gnv/trunk@88 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 15 Sep 2009 10:12:56 +0000
parents a4cb6d175a6e
children 3cb753564552
files gnv/Changelog gnv/src/test/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClientTestCase.java
diffstat 2 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gnv/Changelog	Mon Sep 14 15:29:38 2009 +0000
+++ b/gnv/Changelog	Tue Sep 15 10:12:56 2009 +0000
@@ -1,3 +1,8 @@
+2009-09-15  Tim Englich  <tim.englich@intevation.de>
+
+    * src/test/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClientTestCase.java (testArtifactDatabaseClient) Edited:
+      Added "Create Artifact" and "Describe Artifact" to the Testszenario. 
+      
 2009-09-14  Tim Englich  <tim.englich@intevation.de>
 
     * src/main/java/de/intevation/gnv/artifactdatabase/objects/ArtifactDescription.java,
--- a/gnv/src/test/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClientTestCase.java	Mon Sep 14 15:29:38 2009 +0000
+++ b/gnv/src/test/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClientTestCase.java	Tue Sep 15 10:12:56 2009 +0000
@@ -4,6 +4,7 @@
 package de.intevation.gnv.artifactdatabase.client;
 
 import java.util.Collection;
+import java.util.Iterator;
 
 import org.apache.log4j.BasicConfigurator;
 import org.apache.log4j.Logger;
@@ -30,7 +31,7 @@
     }
     /**
      * Constructor
-     * @param name
+     * @param namemessage
      */
     public ArtifactDatabaseClientTestCase(String name) {
         super(name);
@@ -48,6 +49,17 @@
         try {
             ArtifactDatabaseClient artifactDatabaseClient = ArtifactDatabaseClientFactory.getInstance().getArtifactDatabaseClient();
             Collection<ArtifactObject> factories = artifactDatabaseClient.getArtifactFactories();
+            if (factories != null && !factories.isEmpty()){
+                Iterator<ArtifactObject> it = factories.iterator();
+                while(it.hasNext()){
+                    ArtifactObject aof = it.next();
+                    ArtifactObject artifact = artifactDatabaseClient.createNewArtifact(aof);
+                    artifactDatabaseClient.getCurrentStepDescription(aof, artifact);
+                    log.debug("Artifact aktualisert.");
+                }
+            }
+            
+            
         } catch (ArtifactDatabaseClientException e) {
             log.error(e,e);
             fail();

http://dive4elements.wald.intevation.org