// Path: src/main/java/com/reachcall/pretty/config/Configurator.java
// public static interface ConfiguratorCallback {
//     Configuration activeConfiguration();
// 
//     void onLoad(Configuration configuration);
// }


import com.reachcall.pretty.config.Configurator.ConfiguratorCallback;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import javax.xml.bind.JAXBException;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
import org.junit.BeforeClass;
/**
 * Copyright 2013, Robert Cooper, Reach Health
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 */
package com.reachcall.pretty.config;


/**
 *
 * @author kebernet
 */
public class ConfiguratorTest {
    
    public ConfiguratorTest() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }
    
    @Before
    public void setUp() {
    }
    
    @After
    public void tearDown() {
    }

    /**
     * Test of setConfigFile method, of class Configurator.
     */
    @Test
    public void testSimple() throws JAXBException {
        System.out.println("testSimple");
        File newconfigFile = new File("target/pretty-config.xml");
        
        final Configuration config = new Configuration();
        config.setHostPattern(".*");
        Path p = new Path();
        p.setSource("/*");
        p.setDestination("/");
        ArrayList<Path> paths = new ArrayList<Path>();
        paths.add(p);
        config.setPaths(paths);
// Path: src/main/java/com/reachcall/pretty/config/Configurator.java
// public static interface ConfiguratorCallback {
//     Configuration activeConfiguration();
// 
//     void onLoad(Configuration configuration);
// }


// Path: src/test/java/com/reachcall/pretty/config/ConfiguratorTest.java
import com.reachcall.pretty.config.Configurator.ConfiguratorCallback;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import javax.xml.bind.JAXBException;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
import org.junit.BeforeClass;

/**
 * Copyright 2013, Robert Cooper, Reach Health
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 */
package com.reachcall.pretty.config;


/**
 *
 * @author kebernet
 */
public class ConfiguratorTest {
    
    public ConfiguratorTest() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }
    
    @Before
    public void setUp() {
    }
    
    @After
    public void tearDown() {
    }

    /**
     * Test of setConfigFile method, of class Configurator.
     */
    @Test
    public void testSimple() throws JAXBException {
        System.out.println("testSimple");
        File newconfigFile = new File("target/pretty-config.xml");
        
        final Configuration config = new Configuration();
        config.setHostPattern(".*");
        Path p = new Path();
        p.setSource("/*");
        p.setDestination("/");
        ArrayList<Path> paths = new ArrayList<Path>();
        paths.add(p);
        config.setPaths(paths);
        Configurator configurator = new Configurator(new ConfiguratorCallback(){