public static ProgressSnapshot copyOf(ProgressSnapshot progressSnapshot) { return new ProgressSnapshot(progressSnapshot.time, progressSnapshot.requirementType, progressSnapshot.total, progressSnapshot.completed, progressSnapshot.estimated, progressSnapshot.failed, progressSnapshot.buildId); }
public TestHistory(final String projectName, final EnvironmentVariables environmentVariables, final File baseDirectory) { this(projectName, environmentVariables, baseDirectory, new SystemDateProvider()); }
public ResultCountBuilder and(int count) { return new ResultCountBuilder(count, this); }
private ProgressSnapshot createEndOfSeriesEntry(ProgressSnapshot latestSnapshot, Optional<Point> intersection) { return ProgressSnapshot.forRequirementType(latestSnapshot.getRequirementType()) .atTime(latestSnapshot.getTime().plus(1).secondOfDay().getDateTime()) .and(0).failed() .and(0).completed() .and(latestSnapshot.getCompleted()).estimated() .outOf(latestSnapshot.getTotal()) .forBuild("ESTIMATED_DONE_DATE"); }
public void updateProgressHistory(RequirementsOutcomes requirementsOutcome) { String requirementType = requirementsOutcome.getType(); int totalRequirements = requirementsOutcome.getRequirementCount(); int completedRequirements = requirementsOutcome.getCompletedRequirementsCount(); int failingRequirements = requirementsOutcome.getFailingRequirementsCount(); String buildId = getEnvironmentVariables().getValue(BUILD_ID, "MANUAL"); ProgressSnapshot newSnapshot = ProgressSnapshot.forRequirementType(requirementType) .atTime(dateProvider.getCurrentTime()) .with(completedRequirements).completed() .and(failingRequirements).failed() .outOf(totalRequirements) .forBuild(buildId); try { save(newSnapshot); } catch (FileNotFoundException e) { throw new IllegalArgumentException("Unable to store history data", e); } }
public static ProgressSnapshotBuilder forRequirementType(String requirementType) { return new ProgressSnapshotBuilder(requirementType); }
private File[] getProgressFiles() { return getDirectory().listFiles(new FilenameFilter() { public boolean accept(File directory, String filename) { return filename.startsWith(progressPrefix()); } }); }
public ProgressSnapshot forBuild(String buildId) { return new ProgressSnapshot(time, requirementType, total, completed, useEstimatedValue ? estimated : completed, failing, buildId); }
public ResultCountBuilder with(int count) { return new ResultCountBuilder(count, this); }
public static ProgressSnapshotBuilder forRequirementType(String requirementType) { return new ProgressSnapshotBuilder(requirementType); }
public static ProgressSnapshot copyOf(ProgressSnapshot progressSnapshot) { return new ProgressSnapshot(progressSnapshot.time, progressSnapshot.requirementType, progressSnapshot.total, progressSnapshot.completed, progressSnapshot.estimated, progressSnapshot.failed, progressSnapshot.buildId); }
public ResultCountBuilder and(int count) { return new ResultCountBuilder(count, this); }
public static ProgressSnapshotBuilder forRequirementType(String requirementType) { return new ProgressSnapshotBuilder(requirementType); }
public static ProgressSnapshot copyOf(ProgressSnapshot progressSnapshot) { return new ProgressSnapshot(progressSnapshot.time, progressSnapshot.requirementType, progressSnapshot.total, progressSnapshot.completed, progressSnapshot.estimated, progressSnapshot.failed, progressSnapshot.buildId); }
public ResultCountBuilder with(int count) { return new ResultCountBuilder(count, this); }
public ProgressSnapshot forBuild(String buildId) { return new ProgressSnapshot(time, requirementType, total, completed, useEstimatedValue ? estimated : completed, failing, buildId); }
public ResultCountBuilder with(int count) { return new ResultCountBuilder(count, this); }
public ProgressSnapshot forBuild(String buildId) { return new ProgressSnapshot(time, requirementType, total, completed, useEstimatedValue ? estimated : completed, failing, buildId); }
public ResultCountBuilder and(int count) { return new ResultCountBuilder(count, this); }