Mercurial > dive4elements > gnv-client
view geo-backend/src/test/java/de/intevation/gnv/geobackend/base/query/cache/CacheCleanerTestCase.java @ 1145:dfe1ac687c7f tip
added tags
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:16:15 +0200 |
parents | ebeb56428409 |
children |
line wrap: on
line source
/* * Copyright (c) 2010 by Intevation GmbH * * This program is free software under the LGPL (>=v2.1) * Read the file LGPL.txt coming with the software for details * or visit http://www.gnu.org/licenses/ if it does not exist. */ package de.intevation.gnv.geobackend.base.query.cache; import java.io.FileInputStream; import java.io.InputStream; import java.util.Properties; import junit.framework.TestCase; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Logger; import de.intevation.gnv.geobackend.base.connectionpool.ConnectionPoolFactory; import de.intevation.gnv.geobackend.base.query.container.QueryContainerFactory; public class CacheCleanerTestCase extends TestCase { /** * the logger, used to log exceptions and additonaly information */ private static Logger log = null; static{ BasicConfigurator.configure(); log = Logger.getLogger(CacheCleanerTestCase.class); } public void testCachCleaner(){ log.debug("CacheCleanerTestCase.testCachCleaner"); CacheCleaner cc = new CacheCleaner(); boolean success = cc.test(); if (!success){ log.error("TestCase failed."); fail(); } } /** * @see junit.framework.TestCase#setUp() */ @Override protected void setUp() throws Exception { super.setUp(); InputStream inputStream = new FileInputStream("src/test/ressources/ArcSDEConnectionPoolTestCase.properties"); Properties properties = new Properties(); properties.load(inputStream); ConnectionPoolFactory cpf = ConnectionPoolFactory.getInstance(); cpf.initializeConnectionPool(properties); inputStream = new FileInputStream("src/test/ressources/QueryExecutorTestCase.properties"); properties = new Properties(); properties.load(inputStream); QueryContainerFactory qcf = QueryContainerFactory.getInstance(); qcf.initializeQueryContainer(properties); } }