Examples of AgentOptions


Examples of org.jacoco.core.runtime.AgentOptions

  private StubRuntime runtime;

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

Examples of org.jacoco.core.runtime.AgentOptions

import org.junit.Test;

public class JacocoAgentTest {
  @Test
  public void shouldCreateController() {
    AgentOptions options = new AgentOptions();

    options.setOutput(OutputMode.file);
    JacocoAgent agent = new JacocoAgent(options, null);
    assertTrue(agent.createAgentController() instanceof LocalController);

    options.setOutput(OutputMode.tcpserver);
    assertTrue(agent.createAgentController() instanceof TcpServerController);

    options.setOutput(OutputMode.tcpclient);
    assertTrue(agent.createAgentController() instanceof TcpClientController);

    options.setOutput(OutputMode.mbean);
    assertTrue(agent.createAgentController() instanceof MBeanController);
  }
View Full Code Here

Examples of org.jacoco.core.runtime.AgentOptions

  private ClassLoader classLoader;

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

Examples of org.jacoco.core.runtime.AgentOptions

        .get(AGENT_ARTIFACT_NAME);
    return jacocoAgentArtifact.getFile();
  }

  private AgentOptions createAgentOptions() {
    final AgentOptions agentOptions = new AgentOptions();
    final String destPath = destFile.getAbsolutePath();
    agentOptions.setDestfile(destPath);
    if (append != null) {
      agentOptions.setAppend(append.booleanValue());
    }
    if (getIncludes() != null && !getIncludes().isEmpty()) {
      String agentIncludes = StringUtils.join(getIncludes().iterator(),
          ":");
      agentOptions.setIncludes(agentIncludes);
    }
    if (getExcludes() != null && !getExcludes().isEmpty()) {
      String agentExcludes = StringUtils.join(getExcludes().iterator(),
          ":");
      agentOptions.setExcludes(agentExcludes);
    }
    if (exclClassLoaders != null) {
      agentOptions.setExclClassloader(exclClassLoaders);
    }
    if (sessionId != null) {
      agentOptions.setSessionId(sessionId);
    }
    if (dumpOnExit != null) {
      agentOptions.setDumpOnExit(dumpOnExit.booleanValue());
    }
    if (output != null) {
      agentOptions.setOutput(output);
    }
    if (address != null) {
      agentOptions.setAddress(address);
    }
    if (port != null) {
      agentOptions.setPort(port.intValue());
    }
    return agentOptions;
  }
View Full Code Here

Examples of org.jacoco.core.runtime.AgentOptions

  private AgentOptions options;

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

Examples of org.jacoco.core.runtime.AgentOptions

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

Examples of org.jacoco.core.runtime.AgentOptions

  private AgentOptions options;

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

Examples of org.jacoco.core.runtime.AgentOptions

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

Examples of org.jacoco.core.runtime.AgentOptions

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

Examples of org.jacoco.core.runtime.AgentOptions

          throws IOException {
        return con.getSocketA();
      }
    };
    runtime = new StubRuntime();
    controller.startup(new AgentOptions(), runtime);
    remoteReader = new RemoteControlReader(remoteSocket.getInputStream());
  }
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.