package parser.data;

import dbn.data.OptionsHandler;
import java.io.IOException;
import org.junit.Test;

/**
 *
 * @author evripidis
 */
public class OptionsHandlerTest {
    String[] args;
    
    public OptionsHandlerTest() {
        String[] arguments = {
            "-path",    "D:/Documents/Dropbox/University/Aristotle University of Thessaloniki/Πτυχιακή/data/bookmarks - sparse/",
            "-train",   "bookmarks.arff",
            "-info",    "bookmarks.xml",
            "-e",       "10",
            "-be",      "3",
            "-m",       "0.4",
            "-lr",      "0.3",
            "-l",       "2151", "1000", "207"
        };
        this.args = arguments;
    }

    /**
     * Test of printArgs method, of class OptionsHandler.
     *//*
    @Test
    public void testPrintArgs() throws IOException, Exception {
        OptionsHandler h = new OptionsHandler();
        h.setArgs(args);
        
        System.out.println("Layers:");
        boolean first = true;
        for (int layer : h.getLayers()) {
            if (first) first = false;
            else System.out.print(", ");
            System.out.print(layer);
        }
        System.out.println("");
        System.out.println("Parameters:");
        System.out.println("  Epochs:   " + h.getGreedyEpochs());
        System.out.println("  RBM Epochs: " + h.getBPEpochs());
        System.out.println("  Momentum: " + h.getMomentum());
        System.out.println("  Learning Rate: " + h.getLearningRate());
    }
    //*/
    @Test
    public void testGetFileName() {
        System.out.println(OptionsHandler.GetFileName("/DATA/dbn_test.dbn").replace("_test", ""));
    }
}
