Package org.jacoco.agent.rt.internal.output

Examples of org.jacoco.agent.rt.internal.output.FileOutput.startup()


    File destFile = folder.newFile("jacoco.exec");
    AgentOptions options = new AgentOptions();
    options.setDestfile(destFile.getAbsolutePath());

    FileOutput controller = new FileOutput();
    controller.startup(options, new RuntimeData());

    assertTrue("Execution data file should be created", destFile.exists());
    assertEquals("Execution data file should be empty", 0,
        destFile.length());
  }
View Full Code Here


    File destFile = folder.newFile("jacoco.exec");
    AgentOptions options = new AgentOptions();
    options.setDestfile(destFile.getAbsolutePath());

    FileOutput controller = new FileOutput();
    controller.startup(options, new RuntimeData());
    controller.writeExecutionData(false);
    controller.shutdown();

    assertTrue("Execution data file should be created", destFile.exists());
    assertTrue("Execution data file should have contents",
View Full Code Here

    AgentOptions options = new AgentOptions();
    options.setDestfile(folder.newFolder("folder").getAbsolutePath());
    FileOutput controller = new FileOutput();

    // Startup should fail as the file can not be created:
    controller.startup(options, new RuntimeData());
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.