Examples of ExecutionDataWriter


Examples of org.jacoco.core.data.ExecutionDataWriter

  }

  @Test
  public void testShutdownWithConnection() throws Exception {
    serverSocket.waitForAccept();
    new ExecutionDataWriter(serverSocket.connect().getOutputStream());
    controller.shutdown();
    logger.assertEmpty();
  }
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

        ArquillianRuntime runtime = (ArquillianRuntime) runtimeInst.get();
        if (runtime != null) {
            ByteArrayOutputStream coverageOutputStream = null;
            try {
                coverageOutputStream = new ByteArrayOutputStream();
                ExecutionDataWriter writer = new ExecutionDataWriter(coverageOutputStream);
                runtime.getRuntimeData().collect(writer, writer, true);
            } finally {
                runtime.shutdown();
                if (coverageOutputStream != null) {
                    try {
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

        IRuntime runtime = runtimeInst.get();
        if (runtime != null) {
            ByteArrayOutputStream coverageOutputStream = null;
            try {
                coverageOutputStream = new ByteArrayOutputStream();
                ExecutionDataWriter writer = new ExecutionDataWriter(coverageOutputStream);
                runtime.collect(writer, writer, true);
            } finally {
                runtime.shutdown();
                if (coverageOutputStream != null) {
                    try {
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

      final RemoteControlReader remoteReader = new RemoteControlReader(
          socket.getInputStream());

      // 2. Open file output
      output = openOutputStream();
      final ExecutionDataWriter outputWriter = new ExecutionDataWriter(
          output);
      remoteReader.setSessionInfoVisitor(outputWriter);
      remoteReader.setExecutionDataVisitor(outputWriter);

      // 3. Request dump
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

      if (folder != null) {
        folder.mkdirs();
      }
      OutputStream output = new BufferedOutputStream(
          new FileOutputStream(execFile, options.getAppend()));
      ExecutionDataWriter writer = new ExecutionDataWriter(output);
      writer.writeHeader();
      runtime.collect(writer, false);
      output.close();
    } catch (IOException e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

      if (folder != null) {
        folder.mkdirs();
      }
      OutputStream output = new BufferedOutputStream(
          new FileOutputStream(execFile, options.getAppend()));
      ExecutionDataWriter writer = new ExecutionDataWriter(output);
      writer.writeHeader();
      runtime.collect(writer, false);
      output.close();
    } catch (IOException e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

    try {
      destfile.getParentFile().mkdirs();
      destfile.createNewFile();
      outputStream = new BufferedOutputStream(new FileOutputStream(
          destfile));
      final ExecutionDataWriter dataWriter = new ExecutionDataWriter(
          outputStream);
      dataStore.accept(dataWriter);
    } catch (final IOException e) {
      throw new BuildException(String.format(
          "Unable to write merged file %s", destfile.getName()), e);
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

  }

  @Test
  public void testShutdownWithConnection() throws Exception {
    serverSocket.waitForAccept();
    new ExecutionDataWriter(serverSocket.connect().getOutputStream());
    controller.shutdown();
    logger.assertEmpty();
  }
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

  @Test(expected = IOException.class)
  public void testInvalidContent() throws Exception {
    final OutputStream remoteOut = mockConnection.getSocketB()
        .getOutputStream();
    new ExecutionDataWriter(remoteOut);
    final TcpConnection con = new TcpConnection(
        mockConnection.getSocketA(), runtime);
    con.init();
    remoteOut.write(123);
    con.run();
View Full Code Here

Examples of org.jacoco.core.data.ExecutionDataWriter

   */
  @Test
  public void testRemoteClose() throws Exception {
    final OutputStream remoteOut = mockConnection.getSocketB()
        .getOutputStream();
    new ExecutionDataWriter(remoteOut);

    final TcpConnection con = new TcpConnection(
        mockConnection.getSocketA(), runtime);
    con.init();

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.