/*
 * Copyright (C) 2016 Michel Erb
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.xorinox.datalookup.core;

import com.xorinox.datalookup.api.ICore;
import java.util.Properties;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author Michel Erb
 */
public class ConfigTest implements ICore {

    private final Logger logger = LoggerFactory.getLogger(getClass());

    public ConfigTest() {
    }

    @BeforeClass
    public static void setUpClass() {
    }

    @AfterClass
    public static void tearDownClass() {
    }

    @Before
    public void setUp() {
    }

    @After
    public void tearDown() {
    }

    @Test
    public void testGet() {
        System.out.println("get");
        Properties config = Util.getProperties(CONFIG_FILE);
        assertNotNull(config.get("date-format-stamp"));
        assertNotNull(config.get("cassandra-nodes"));
        assertNotNull(config.get("cassandra-datacenter-name"));
        assertNotNull(config.get("cassandra-port"));
        assertNotNull(config.get("cassandra-keyspace"));
        assertNotNull(config.get("cassandra-username"));
        assertNotNull(config.get("cassandra-password"));
        assertNotNull(config.get("cassandra-remote-min-hosts"));
        assertNotNull(config.get("cassandra-pool-local-min"));
        assertNotNull(config.get("cassandra-pool-local-max"));
        assertNotNull(config.get("cassandra-pool-remote-min"));
        assertNotNull(config.get("cassandra-pool-remote-max"));
    }
}
