Examples of increment()


Examples of org.jacoco.core.analysis.LinesImpl.increment()

    // 4: . + N = N
    // 5: N + N = N
    // ============
    // 4 total, 0 covered
    LinesImpl c = new LinesImpl(new int[] { 1, 2, 5 }, false);
    c.increment(new LinesImpl(new int[] { 1, 4, 5 }, false));
    assertEquals(4, c.getTotalCount(), 0.0);
    assertEquals(0, c.getCoveredCount(), 0.0);
    assertEquals(1, c.getFirstLine(), 0.0);
    assertEquals(5, c.getLastLine(), 0.0);
    assertEquals(NOT_COVERED, c.getStatus(1), 0.0);
View Full Code Here

Examples of org.jacoco.core.internal.analysis.MethodCoverageImpl.increment()

  @Test
  public void testCreateClassMissed() {
    final MethodCoverageImpl method = new MethodCoverageImpl("doit", "()V",
        null);
    method.increment(CounterImpl.COUNTER_1_0, CounterImpl.COUNTER_0_0, 6);
    method.increment(CounterImpl.COUNTER_1_0, CounterImpl.COUNTER_0_0, 7);
    method.increment(CounterImpl.COUNTER_1_0, CounterImpl.COUNTER_0_0, 8);
    addClass(123L, "Sample", null, method);

    final Collection<IClassCoverage> classes = coverageBuilder.getClasses();
View Full Code Here

Examples of org.jacoco.core.internal.analysis.SourceFileCoverageImpl.increment()

      }
      final String source = coverage.getSourceFileName();
      if (source != null) {
        final SourceFileCoverageImpl sourceFile = getSourceFile(source,
            coverage.getPackageName());
        sourceFile.increment(coverage);
      }
    }
  }

  private SourceFileCoverageImpl getSourceFile(final String filename,
View Full Code Here

Examples of org.jacoco.core.internal.analysis.SourceNodeImpl.increment()

    final IReportVisitor packageHandler = handler
        .visitChild(new CoverageNodeImpl(ElementType.PACKAGE,
            "org.jacoco.example"));
    final SourceNodeImpl node = new SourceNodeImpl(ElementType.SOURCEFILE,
        "Foo.java");
    node.increment(CounterImpl.getInstance(1, 2),
        CounterImpl.getInstance(3, 4), 12);
    packageHandler.visitChild(node).visitEnd(null);
    packageHandler.visitEnd(null);
    final Document doc = getDocument();
    assertEquals("Foo.java",
View Full Code Here

Examples of org.jboss.as.demos.ejb3.archive.SimpleSingletonLocal.increment()

        try {

            for (int i = 0; i < numTimes; i++) {
                Context ctx = new InitialContext();
                SimpleSingletonLocal bean = (SimpleSingletonLocal) ctx.lookup(jndiName);
                bean.increment();
            }
        } finally {
            latch.countDown();
        }
        return null;
View Full Code Here

Examples of org.jboss.as.jpa.config.PersistenceUnitCount.increment()

                counter = new PersistenceUnitCount();
                deploymentUnit.putAttachment(PersistenceUnitCount.PERSISTENCE_UNIT_COUNT, counter);
            }
        }

        counter.increment(persistenceUnitCount);
        JPA_LOGGER.tracef("incrementing PU count for %s by %d", deploymentUnit.getName(), persistenceUnitCount);
    }


}
View Full Code Here

Examples of org.jboss.as.jpa.config.PersistenceUnitsInApplication.increment()

        topDeploymentUnit = DeploymentUtils.getTopDeploymentUnit(topDeploymentUnit);

        // create persistence unit counter if not done already
        synchronized (topDeploymentUnit) {  // ensure that only one deployment thread sets this at a time
            PersistenceUnitsInApplication persistenceUnitsInApplication = getPersistenceUnitsInApplication(topDeploymentUnit);
            persistenceUnitsInApplication.increment(persistenceUnitCount);
        }
        JPA_LOGGER.tracef("incrementing PU count for %s by %d", topDeploymentUnit.getName(), persistenceUnitCount);
    }

    private void addApplicationDependenciesOnProvider(DeploymentUnit topDeploymentUnit, PersistenceUnitMetadataHolder holder) {
View Full Code Here

Examples of org.jboss.as.quickstarts.ejb.remote.stateful.RemoteCounter.increment()

        // invoke on the remote counter bean
        final int NUM_TIMES = 5;
        System.out.println("Counter will now be incremented " + NUM_TIMES + " times");
        for (int i = 0; i < NUM_TIMES; i++) {
            System.out.println("Incrementing counter");
            statefulRemoteCounter.increment();
            System.out.println("Count after increment is " + statefulRemoteCounter.getCount());
        }
        // now decrementing
        System.out.println("Counter will now be decremented " + NUM_TIMES + " times");
        for (int i = NUM_TIMES; i > 0; i--) {
View Full Code Here

Examples of org.jboss.as.test.clustering.cluster.ejb.remote.bean.Incrementor.increment()

            // Allow sufficient time for client to receive full topology
            Thread.sleep(CLIENT_TOPOLOGY_UPDATE_WAIT);

            List<String> results = new ArrayList<>(COUNT);
            for (int i = 0; i < COUNT; ++i) {
                Result<Integer> result = bean.increment();
                results.add(result.getNode());
                Thread.sleep(INVOCATION_WAIT);
            }

            for (String node: NODES) {
View Full Code Here

Examples of org.jboss.as.test.clustering.cluster.ejb.stateful.bean.Incrementor.increment()

            } catch (NamingException e) {
                throw new ServletException(e);
            }
        }
        try {
            resp.setHeader(COUNT, String.valueOf(incrementor.increment()));
            session.setAttribute(BEAN, incrementor);
        } catch (NoSuchEJBException e) {
            resp.setHeader(COUNT, String.valueOf(0));
            session.removeAttribute(BEAN);
        }
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.