changeset 5:4027821ca8d7

Testcase for querying Artifacfactorydescriptions from the ArtifactDatabase gnv/trunk@74 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 11 Sep 2009 15:23:29 +0000
parents 72951b955f00
children 6592580ae823
files gnv/Changelog gnv/src/test/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClientTestCase.java
diffstat 2 files changed, 62 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gnv/Changelog	Fri Sep 11 15:21:58 2009 +0000
+++ b/gnv/Changelog	Fri Sep 11 15:23:29 2009 +0000
@@ -1,3 +1,8 @@
+2009-09-11  Tim Englich  <tim.englich@intevation.de>
+
+    * src/test/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClientTestCase.java Added:
+    Testcase for querying Artifacfactorydescriptions from the ArtifactDatabase 
+    
 2009-09-11  Tim Englich  <tim.englich@intevation.de>
 
     * src/main/webapp/WEB-INF/jsp/index.jsp Added , 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv/src/test/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClientTestCase.java	Fri Sep 11 15:23:29 2009 +0000
@@ -0,0 +1,57 @@
+/**
+ *
+ */
+package de.intevation.gnv.artifactdatabase.client;
+
+import java.util.Collection;
+
+import org.apache.log4j.BasicConfigurator;
+import org.apache.log4j.Logger;
+
+import de.intevation.gnv.artifactdatabase.client.exception.ArtifactDatabaseClientException;
+import de.intevation.gnv.artifactdatabase.objects.ArtifactObject;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Tim Englich <tim.englich@intevation.de>
+ *
+ */
+public class ArtifactDatabaseClientTestCase extends TestCase {
+
+    /**
+     * the logger, used to log exceptions and additonaly information
+     */
+    private static Logger log = null;
+    
+    static{
+        BasicConfigurator.configure();
+        log = Logger.getLogger(DefaultArtifactDatabaseClient.class);
+    }
+    /**
+     * Constructor
+     * @param name
+     */
+    public ArtifactDatabaseClientTestCase(String name) {
+        super(name);
+    }
+
+    /**
+     * @see junit.framework.TestCase#setUp()
+     */
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
+    
+    public void testArtifactDatabaseClient(){
+        
+        try {
+            ArtifactDatabaseClient artifactDatabaseClient = ArtifactDatabaseClientFactory.getInstance().getArtifactDatabaseClient();
+            Collection<ArtifactObject> factories = artifactDatabaseClient.getArtifactFactories();
+        } catch (ArtifactDatabaseClientException e) {
+            log.error(e,e);
+            fail();
+        }
+    }
+
+}

http://dive4elements.wald.intevation.org