Package org.jacoco.core.data

Examples of org.jacoco.core.data.ExecutionDataStore$Entry


    final CoverageSession session = new CoverageSession("Description",
        Arrays.asList(root1), Path.fromOSString(execfile.getAbsolutePath()),
        configuration);

    SessionInfoStore sessionStore = new SessionInfoStore();
    ExecutionDataStore execStore = new ExecutionDataStore();
    session.readExecutionData(execStore, sessionStore,
        new NullProgressMonitor());

    assertEquals(1, sessionStore.getInfos().size());
    assertEquals("MyClass", execStore.get(123).getName());
  }
View Full Code Here


    final CoverageSession session = new CoverageSession("Description",
        Arrays.asList(root1), Path.fromOSString(execfile.getAbsolutePath()),
        configuration);

    SessionInfoStore sessionStore = new SessionInfoStore();
    ExecutionDataStore execStore = new ExecutionDataStore();
    final IProgressMonitor monitor = new NullProgressMonitor();
    monitor.setCanceled(true);
    session.readExecutionData(execStore, sessionStore, monitor);

    assertNull(execStore.get(123));
  }
View Full Code Here

    final CoverageSession session = new CoverageSession("Description",
        Arrays.asList(root1), Path.fromOSString(execfile.getAbsolutePath()),
        configuration);

    SessionInfoStore sessionStore = new SessionInfoStore();
    ExecutionDataStore execStore = new ExecutionDataStore();
    final IProgressMonitor monitor = new NullProgressMonitor();
    session.readExecutionData(execStore, sessionStore, monitor);
  }
View Full Code Here

  public void testReadExecutionData() throws IOException, CoreException {
    final CoverageSession session = new CoverageSession("Description",
        Arrays.asList(root1), source(), configuration);

    SessionInfoStore sessionStore = new SessionInfoStore();
    ExecutionDataStore execStore = new ExecutionDataStore();
    session.accept(execStore, sessionStore);

    assertEquals(1, sessionStore.getInfos().size());
    assertEquals("MyClass", execStore.get(123).getName());
  }
View Full Code Here

  @Test
  public void testAccept() throws IOException, CoreException {
    final IExecutionDataSource source = createValidSource();

    SessionInfoStore sessionStore = new SessionInfoStore();
    ExecutionDataStore execStore = new ExecutionDataStore();
    source.accept(execStore, sessionStore);

    assertEquals(1, sessionStore.getInfos().size());
    assertEquals("MyClass", execStore.get(123).getName());
  }
View Full Code Here

    exception.expectMessage("Error while reading execution data file");

    final IExecutionDataSource source = creatInvalidSource();

    SessionInfoStore sessionStore = new SessionInfoStore();
    ExecutionDataStore execStore = new ExecutionDataStore();
    source.accept(execStore, sessionStore);
  }
View Full Code Here

    modelcoverage = new JavaModelCoverage();
    final Collection<IPackageFragmentRoot> roots = session.getScope();
    monitor.beginTask(
        NLS.bind(CoreMessages.AnalyzingCoverageSession_task,
            session.getDescription()), 1 + roots.size());
    executiondatastore = new ExecutionDataStore();
    sessioninfostore = new SessionInfoStore();
    session.readExecutionData(executiondatastore, sessioninfostore,
        new SubProgressMonitor(monitor, 1));

    final PackageFragementRootAnalyzer analyzer = new PackageFragementRootAnalyzer(
View Full Code Here

    }
  }

  private void loadExecutionData() throws IOException {
    sessionInfoStore = new SessionInfoStore();
    executionDataStore = new ExecutionDataStore();
    FileInputStream in = null;
    try {
      in = new FileInputStream(dataFile);
      final ExecutionDataReader reader = new ExecutionDataReader(in);
      reader.setSessionInfoVisitor(sessionInfoStore);
View Full Code Here

  private void readAndAssertData() throws IOException {
    final RemoteControlReader remoteReader = new RemoteControlReader(
        mockConnection.getSocketB().getInputStream());

    final ExecutionDataStore execStore = new ExecutionDataStore();
    remoteReader.setExecutionDataVisitor(execStore);
    final SessionInfoStore infoStore = new SessionInfoStore();
    remoteReader.setSessionInfoVisitor(infoStore);

    assertTrue(remoteReader.read());

    final List<SessionInfo> infos = infoStore.getInfos();
    assertEquals(1, infos.size());
    assertEquals("stubid", infos.get(0).getId());

    assertEquals("Foo", execStore.get(0x12345678).getName());
  }
View Full Code Here

    remoteWriter.visitDumpCommand(false, true);

    final RemoteControlReader remoteReader = new RemoteControlReader(
        mockConnection.getSocketB().getInputStream());

    final ExecutionDataStore execStore = new ExecutionDataStore();
    remoteReader.setExecutionDataVisitor(execStore);
    final SessionInfoStore infoStore = new SessionInfoStore();
    remoteReader.setSessionInfoVisitor(infoStore);

    assertTrue(remoteReader.read());
    assertTrue(infoStore.getInfos().isEmpty());
    assertTrue(execStore.getContents().isEmpty());
    runtime.assertNoProbes();

    con.close();
    f.get();
  }
View Full Code Here

TOP

Related Classes of org.jacoco.core.data.ExecutionDataStore$Entry

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.