@Test public void testSimpleProcessOnePath() throws Exception { addActivityEntry("Receive", "receive", 1); addActivityEntry("A1", "assign", 1); addActivityEntry("A2", "assign", 0); addActivityEntry("Reply", "reply", 1); ActivityMetricCoverage amc = new ActivityMetricCoverage(markers, markerMapping, markerCounter); List<ICoverageResult> result = amc.getCoverageResult(); assertEquals(8, result.size()); ICoverageResult currentResult = result.remove(0); assertEquals(" assertEquals(1.0, currentResult.coverage(), 0.001); currentResult = result.remove(0); assertEquals(" assertEquals(1.0, currentResult.coverage(), 0.001); currentResult = result.remove(0); assertEquals(" assertEquals(0.0, currentResult.coverage(), 0.001); currentResult = result.remove(0); assertEquals(" assertEquals(1.0, currentResult.coverage(), 0.001); currentResult = result.remove(0); assertEquals(" assertEquals(0.5, currentResult.coverage(), 0.001); assertEquals(0.0, currentResult.min(), 0.001); assertEquals(1.0, currentResult.max(), 0.001); assertEquals(0.5, currentResult.avg(), 0.001); assertEquals(1, currentResult.getExecutionCount()); currentResult = result.remove(0); assertEquals(" assertEquals(1.0, currentResult.coverage(), 0.001); assertEquals(1.0, currentResult.min(), 0.001); assertEquals(1.0, currentResult.max(), 0.001); assertEquals(1.0, currentResult.avg(), 0.001); assertEquals(1, currentResult.getExecutionCount()); currentResult = result.remove(0); assertEquals(" assertEquals(1.0, currentResult.coverage(), 0.001); assertEquals(1.0, currentResult.min(), 0.001); assertEquals(1.0, currentResult.max(), 0.001); assertEquals(1.0, currentResult.avg(), 0.001); assertEquals(1, currentResult.getExecutionCount()); currentResult = result.remove(0); assertEquals("Overall", currentResult.getBPELElementReference()); assertEquals(0.75, currentResult.coverage(), 0.001); assertEquals(0.0, currentResult.min(), 0.001); assertEquals(1.0, currentResult.max(), 0.001); assertEquals(0.75, currentResult.avg(), 0.001); assertEquals(3, currentResult.getExecutionCount()); }
public List<ICoverageResult> getCoverageResult() { return new ArrayList<ICoverageResult>(results); }
ActivityMetricCoverage implements IMetricCoverage { public List<ICoverageResult> getCoverageResult() { return new ArrayList<ICoverageResult>(results); } }
ActivityMetricCoverage implements IMetricCoverage { public List<ICoverageResult> getCoverageResult() { return new ArrayList<ICoverageResult>(results); } ActivityMetricCoverage(List<String> markers,
			Map<String, ? extends IActivity> markerMapping,
			Map<String, Integer> markerCounter); }
ActivityMetricCoverage implements IMetricCoverage { public List<ICoverageResult> getCoverageResult() { return new ArrayList<ICoverageResult>(results); } ActivityMetricCoverage(List<String> markers,
			Map<String, ? extends IActivity> markerMapping,
			Map<String, Integer> markerCounter); String getMetricName(); String getMetricId(); List<ICoverageResult> getCoverageResult(); }
ActivityMetricCoverage implements IMetricCoverage { public List<ICoverageResult> getCoverageResult() { return new ArrayList<ICoverageResult>(results); } ActivityMetricCoverage(List<String> markers,
			Map<String, ? extends IActivity> markerMapping,
			Map<String, Integer> markerCounter); String getMetricName(); String getMetricId(); List<ICoverageResult> getCoverageResult();  }