Package org.jacoco.core.runtime

Examples of org.jacoco.core.runtime.AgentOptions


  private AgentOptions options;

  @Before
  public void setup() {
    options = new AgentOptions();
  }
View Full Code Here


  /**
   * Create default agent options
   */
  protected AbstractCoverageTask() {
    agentOptions = new AgentOptions();
    enabled = true;
  }
View Full Code Here

          throws IOException {
        return con.getSocketA();
      }
    };
    runtime = new StubRuntime();
    controller.startup(new AgentOptions(), runtime);
    remoteReader = new RemoteControlReader(remoteSocket.getInputStream());
  }
View Full Code Here

  public TemporaryFolder folder = new TemporaryFolder();

  @Test
  public void testWriteData() throws Exception {
    File destFile = folder.newFile("jacoco.exec");
    AgentOptions options = new AgentOptions();
    options.setDestfile(destFile.getAbsolutePath());

    IRuntime runtime = new StubRuntime();

    LocalController controller = new LocalController();
    controller.startup(options, runtime);
View Full Code Here

    assertTrue("Execution data file should be created", destFile.exists());
  }

  @Test(expected = IOException.class)
  public void testInvalidDestFile() throws Exception {
    AgentOptions options = new AgentOptions();
    options.setDestfile(folder.newFolder("folder").getAbsolutePath());
    IRuntime runtime = new StubRuntime();
    LocalController controller = new LocalController();

    // Startup should fail as the file can not be created:
    controller.startup(options, runtime);
View Full Code Here

  private ClassLoader classLoader;

  @Before
  public void setup() {
    options = new AgentOptions();
    classLoader = getClass().getClassLoader();
  }
View Full Code Here

  public TemporaryFolder folder = new TemporaryFolder();

  @Test
  public void testWriteData() throws Exception {
    File destFile = folder.newFile("jacoco.exec");
    AgentOptions options = new AgentOptions();
    options.setDestfile(destFile.getAbsolutePath());

    IRuntime runtime = new StubRuntime();

    LocalController controller = new LocalController();
    controller.startup(options, runtime);
View Full Code Here

    assertTrue("Execution data file should be created", destFile.exists());
  }

  @Test(expected = IOException.class)
  public void testInvalidDestFile() throws Exception {
    AgentOptions options = new AgentOptions();
    options.setDestfile(folder.newFolder("folder").getAbsolutePath());
    IRuntime runtime = new StubRuntime();
    LocalController controller = new LocalController();

    // Startup should fail as the file can not be created:
    controller.startup(options, runtime);
View Full Code Here

   *
   * @param agentArgs
   *            agent options as text string
   */
  public JacocoAgent(String options) {
    this(new AgentOptions(options));
  }
View Full Code Here

  private Exception exception;

  @Before
  public void setup() {
    options = new AgentOptions();
    execfile = new File(folder.getRoot(), "jacoco.exec");
    options.setOutput(OutputMode.file);
    options.setDestfile(execfile.getAbsolutePath());
  }
View Full Code Here

TOP

Related Classes of org.jacoco.core.runtime.AgentOptions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.