@Test(dataProvider = "calculatePercentCompleteProvider") public void testCalculatePercentComplete(int completedOperationCount, int totalOperationCount, double incompleteOperationPercentTotal, double EXPECTED_VALUE) { Assert.assertEquals(AgendaProgressThread.calculatePercentComplete(completedOperationCount, totalOperationCount, incompleteOperationPercentTotal), EXPECTED_VALUE); }
protected static double calculatePercentComplete(int completedOperationCount, int totalOperationCount, double incompleteOperationPercentTotal) { return (totalOperationCount > 0) ? ((completedOperationCount * 100d) + incompleteOperationPercentTotal) / totalOperationCount : 0d; }
AgendaProgressThread extends BaseReporterThread<AgendaProgressThreadConfig> implements AgendaProgressConsumer { protected static double calculatePercentComplete(int completedOperationCount, int totalOperationCount, double incompleteOperationPercentTotal) { return (totalOperationCount > 0) ? ((completedOperationCount * 100d) + incompleteOperationPercentTotal) / totalOperationCount : 0d; } }
AgendaProgressThread extends BaseReporterThread<AgendaProgressThreadConfig> implements AgendaProgressConsumer { protected static double calculatePercentComplete(int completedOperationCount, int totalOperationCount, double incompleteOperationPercentTotal) { return (totalOperationCount > 0) ? ((completedOperationCount * 100d) + incompleteOperationPercentTotal) / totalOperationCount : 0d; } AgendaProgressThread(AgendaProgressThreadConfig agendaProgressThreadConfig); }
AgendaProgressThread extends BaseReporterThread<AgendaProgressThreadConfig> implements AgendaProgressConsumer { protected static double calculatePercentComplete(int completedOperationCount, int totalOperationCount, double incompleteOperationPercentTotal) { return (totalOperationCount > 0) ? ((completedOperationCount * 100d) + incompleteOperationPercentTotal) / totalOperationCount : 0d; } AgendaProgressThread(AgendaProgressThreadConfig agendaProgressThreadConfig); @Override synchronized void setAgendaProgress(AgendaProgress agendaProgress); @Override synchronized void registerOperationProgressProvider(OperationProgressProvider operationProgressProvder); @Override synchronized void setTotalProgressOperationCount(int totalProgressOperationCount); @Override synchronized void adjustTotalProgressOperationCount(int operationTotalCountAdjustment); @Override synchronized void incrementCompletedOperationCount(int incrementAmount); }
AgendaProgressThread extends BaseReporterThread<AgendaProgressThreadConfig> implements AgendaProgressConsumer { protected static double calculatePercentComplete(int completedOperationCount, int totalOperationCount, double incompleteOperationPercentTotal) { return (totalOperationCount > 0) ? ((completedOperationCount * 100d) + incompleteOperationPercentTotal) / totalOperationCount : 0d; } AgendaProgressThread(AgendaProgressThreadConfig agendaProgressThreadConfig); @Override synchronized void setAgendaProgress(AgendaProgress agendaProgress); @Override synchronized void registerOperationProgressProvider(OperationProgressProvider operationProgressProvder); @Override synchronized void setTotalProgressOperationCount(int totalProgressOperationCount); @Override synchronized void adjustTotalProgressOperationCount(int operationTotalCountAdjustment); @Override synchronized void incrementCompletedOperationCount(int incrementAmount);  }