Mercurial > dive4elements > gnv-client
comparison geo-backend/src/test/java/de/intevation/gnv/geobackend/base/query/cache/CacheCleanerTestCase.java @ 896:c7756576044f
Integrated Testcase for testing the Basefunctionality of the CacheCleaner
geo-backend/trunk@959 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 20 Apr 2010 12:46:40 +0000 |
parents | |
children | 02cd2935b5fa |
comparison
equal
deleted
inserted
replaced
895:eb777022b628 | 896:c7756576044f |
---|---|
1 package de.intevation.gnv.geobackend.base.query.cache; | |
2 | |
3 import java.io.FileInputStream; | |
4 import java.io.InputStream; | |
5 import java.util.Properties; | |
6 | |
7 import junit.framework.TestCase; | |
8 | |
9 import org.apache.log4j.BasicConfigurator; | |
10 import org.apache.log4j.Logger; | |
11 | |
12 import de.intevation.gnv.geobackend.base.connectionpool.ConnectionPoolFactory; | |
13 import de.intevation.gnv.geobackend.base.query.container.QueryContainerFactory; | |
14 | |
15 public class CacheCleanerTestCase extends TestCase { | |
16 | |
17 /** | |
18 * the logger, used to log exceptions and additonaly information | |
19 */ | |
20 private static Logger log = null; | |
21 | |
22 static{ | |
23 BasicConfigurator.configure(); | |
24 log = Logger.getLogger(CacheCleanerTestCase.class); | |
25 } | |
26 | |
27 public void testCachCleaner(){ | |
28 log.debug("CacheCleanerTestCase.testCachCleaner"); | |
29 CacheCleaner cc = new CacheCleaner(); | |
30 boolean success = cc.test(); | |
31 if (!success){ | |
32 log.error("TestCase failed."); | |
33 fail(); | |
34 } | |
35 } | |
36 | |
37 /** | |
38 * @see junit.framework.TestCase#setUp() | |
39 */ | |
40 @Override | |
41 protected void setUp() throws Exception { | |
42 | |
43 super.setUp(); | |
44 InputStream inputStream = new FileInputStream("src/test/ressources/ArcSDEConnectionPoolTestCase.properties"); | |
45 Properties properties = new Properties(); | |
46 properties.load(inputStream); | |
47 | |
48 ConnectionPoolFactory cpf = ConnectionPoolFactory.getInstance(); | |
49 cpf.initializeConnectionPool(properties); | |
50 | |
51 | |
52 inputStream = new FileInputStream("src/test/ressources/QueryExecutorTestCase.properties"); | |
53 properties = new Properties(); | |
54 properties.load(inputStream); | |
55 | |
56 QueryContainerFactory qcf = QueryContainerFactory.getInstance(); | |
57 qcf.initializeQueryContainer(properties); | |
58 } | |
59 } |