package org.broadinstitute.sting; import org.apache.log4j.*; import org.junit.*; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.Enumeration; /** * * User: aaron * Date: Apr 14, 2009 * Time: 10:24:30 AM * * The Broad Institute * SOFTWARE COPYRIGHT NOTICE AGREEMENT * This software and its documentation are copyright 2009 by the * Broad Institute/Massachusetts Institute of Technology. All rights are reserved. * * This software is supplied without any warranty or guaranteed support whatsoever. Neither * the Broad Institute nor MIT can be responsible for its use, misuse, or functionality. * */ /** * @author aaron * @version 1.0 * @date Apr 14, 2009 *
* Class BaseTest * * This is the base test class for all of our test cases. All test cases should extend from this * class; it sets up the logger, and resolves the location of directories that we rely on. */ public abstract class BaseTest { /** our log, which we want to capture anything from org.broadinstitute.sting */ public static Logger logger = Logger.getRootLogger(); protected static String seqLocation = "/seq/"; protected static String oneKGLocation = "/broad/1KG/"; protected static String GATKDataLocation = "/humgen/gsa-hpprojects/GATK/data/"; protected static String validationDataLocation = GATKDataLocation + "Validation_Data/"; protected static String evaluationDataLocation = GATKDataLocation + "Evaluation_Data/"; protected static String testDir = "testdata/"; protected static boolean alreadySetup = false; /** before the class starts up */ @BeforeClass public static void baseStartup() { if (!alreadySetup) { alreadySetup = true; // setup a basic log configuration BasicConfigurator.configure(); // setup our log layout PatternLayout layout = new PatternLayout(); layout.setConversionPattern("TEST %C{1}.%M - %d{HH:mm:ss,SSS} - %m%n"); // now set the layout of all the loggers to our layout Enumeration