view gnv-artifacts/src/test/java/de/intevation/gnv/artifacts/ressource/RessourceFactoryTestCase.java @ 1115:f953c9a559d8

Added license file and license headers. gnv-artifacts/trunk@1260 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 02 Nov 2010 17:46:55 +0000
parents c4156275c1e1
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.artifacts.ressource;

import de.intevation.artifactdatabase.DefaultPreferredLocale;

import de.intevation.artifacts.PreferredLocale;

import junit.framework.TestCase;

import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;

/**
 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
 *
 */
public class RessourceFactoryTestCase extends TestCase {
    /**
     * the logger, used to log exceptions and additonaly information
     */
    private static Logger log = null;

    static {
        BasicConfigurator.configure();
        log = Logger.getLogger(RessourceFactoryTestCase.class);
    }

    /**
     * Constructor
     *
     * @param name
     */
    public RessourceFactoryTestCase(String name) {
        super(name);
    }

    /**
     * @see junit.framework.TestCase#setUp()
     */
    @Override
    protected void setUp() throws Exception {
        super.setUp();
        // System.setProperty("artifact.ressource.dir",
        // "src/test/ressources/lang");
    }

    public void testRessurceFactoryTestCase() {
        ;
        String value = RessourceFactory.getInstance()
                .getRessource(
                        new PreferredLocale[] { new DefaultPreferredLocale(
                                "de", 1.0f) }, "fis_modeldata", "N/N");
        log.debug(value);
        value = RessourceFactory.getInstance()
                .getRessource(
                        new PreferredLocale[] { new DefaultPreferredLocale(
                                "en", 1.0f) }, "fis_modeldata", "N/N");
        log.debug(value);
    }

}

http://dive4elements.wald.intevation.org