// Path: jdcallgraph/src/main/java/com/dkarv/jdcallgraph/util/options/GroupBy.java
// public enum GroupBy {
//   ENTRY, THREAD
// 
// }
// 
// Path: jdcallgraph/src/main/java/com/dkarv/jdcallgraph/util/options/Target.java
// public enum Target {
//   /**
//    * Output a test coverage matrix.
//    */
//   MATRIX,
//   /**
//    * Output the call graph in dot format.
//    */
//   DOT,
//   /**
//    * Coverage csv.
//    */
//   COVERAGE,
//   /**
//    * All methods used per entry.
//    */
//   TRACE,
//   /**
//    * The line number of each entry (method/test).
//    */
//   LINES,
//   /**
//    * Data Dependence graph as dot file.
//    */
//   DD_DOT,
//   /**
//    * Data dependence graph as csv.
//    */
//   DD_TRACE;
// 
//   public boolean isDataDependency() {
//     return this == Target.DD_DOT || this == Target.DD_TRACE;
//   }
// }


import com.dkarv.jdcallgraph.util.options.GroupBy;
import com.dkarv.jdcallgraph.util.options.Target;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.IOException;

  @Test
  public void testLogLevel() throws IOException {
    ConfigUtils.replace(true, "logLevel: 4");
    Assert.assertEquals(4, Config.getInst().logLevel());

    try {
      ConfigUtils.replace(true, "logLevel: -1");
      Assert.fail("Did not detect negative log level");
    } catch (IllegalArgumentException e) {
    }
    try {
      ConfigUtils.replace(true, "logLevel: 7");
      Assert.fail("Did not detect too high loglevel");
    } catch (IllegalArgumentException e) {
    }
  }

  @Test
  public void testLogConsole() throws IOException {
    ConfigUtils.replace(true, "logConsole: true");
    Assert.assertEquals(true, Config.getInst().logConsole());


    ConfigUtils.replace(true, "logConsole: false");
    Assert.assertEquals(false, Config.getInst().logConsole());
  }

  @Test
  public void testWriteTo() throws IOException {
// Path: jdcallgraph/src/main/java/com/dkarv/jdcallgraph/util/options/GroupBy.java
// public enum GroupBy {
//   ENTRY, THREAD
// 
// }
// 
// Path: jdcallgraph/src/main/java/com/dkarv/jdcallgraph/util/options/Target.java
// public enum Target {
//   /**
//    * Output a test coverage matrix.
//    */
//   MATRIX,
//   /**
//    * Output the call graph in dot format.
//    */
//   DOT,
//   /**
//    * Coverage csv.
//    */
//   COVERAGE,
//   /**
//    * All methods used per entry.
//    */
//   TRACE,
//   /**
//    * The line number of each entry (method/test).
//    */
//   LINES,
//   /**
//    * Data Dependence graph as dot file.
//    */
//   DD_DOT,
//   /**
//    * Data dependence graph as csv.
//    */
//   DD_TRACE;
// 
//   public boolean isDataDependency() {
//     return this == Target.DD_DOT || this == Target.DD_TRACE;
//   }
// }


// Path: jdcallgraph/src/test/java/com/dkarv/jdcallgraph/util/config/ConfigTest.java
import com.dkarv.jdcallgraph.util.options.GroupBy;
import com.dkarv.jdcallgraph.util.options.Target;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import java.io.IOException;


  @Test
  public void testLogLevel() throws IOException {
    ConfigUtils.replace(true, "logLevel: 4");
    Assert.assertEquals(4, Config.getInst().logLevel());

    try {
      ConfigUtils.replace(true, "logLevel: -1");
      Assert.fail("Did not detect negative log level");
    } catch (IllegalArgumentException e) {
    }
    try {
      ConfigUtils.replace(true, "logLevel: 7");
      Assert.fail("Did not detect too high loglevel");
    } catch (IllegalArgumentException e) {
    }
  }

  @Test
  public void testLogConsole() throws IOException {
    ConfigUtils.replace(true, "logConsole: true");
    Assert.assertEquals(true, Config.getInst().logConsole());


    ConfigUtils.replace(true, "logConsole: false");
    Assert.assertEquals(false, Config.getInst().logConsole());
  }

  @Test
  public void testWriteTo() throws IOException {
    for (Target t : Target.values()) {