Package org.jacoco.agent.rt

Examples of org.jacoco.agent.rt.StubRuntime


  private TcpServerController controller;

  @Before
  public void setup() throws Exception {
    options = new AgentOptions();
    runtime = new StubRuntime();
    logger = new ExceptionRecorder();
    serverSocket = new MockServerSocket();
    controller = new TcpServerController(logger) {
      @Override
      protected ServerSocket createServerSocket(AgentOptions options)
View Full Code Here


  @Before
  @Override
  public void setup() throws Exception {
    super.setup();
    mockConnection = new MockSocketConnection();
    runtime = new StubRuntime();
  }
View Full Code Here

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

  @Test
  public void testWriteData() throws Exception {
    AgentOptions options = new AgentOptions();
    options.setDestfile(coverageFile.getAbsolutePath());

    IRuntime runtime = new StubRuntime();

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

  private TcpServerController controller;

  @Before
  public void setup() throws Exception {
    options = new AgentOptions();
    runtime = new StubRuntime();
    logger = new ExceptionRecorder();
    serverSocket = new MockServerSocket();
    controller = new TcpServerController(logger) {
      @Override
      protected ServerSocket createServerSocket(AgentOptions options)
View Full Code Here

  @Before
  @Override
  public void setup() throws Exception {
    super.setup();
    mockConnection = new MockSocketConnection();
    runtime = new StubRuntime();
  }
View Full Code Here

  private MBeanController controller;

  @Before
  public void setup() throws Exception {
    runtime = new StubRuntime();
    controller = new MBeanController();
    controller.startup(new AgentOptions(), runtime);
  }
View Full Code Here

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

  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);
    controller.writeExecutionData();
    controller.shutdown();
View Full Code Here

  @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

TOP

Related Classes of org.jacoco.agent.rt.StubRuntime

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.