All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fitnesse.reporting.history.MostRecentPageHistoryReader Maven / Gradle / Ivy

There is a newer version: 20241026
Show newest version
package fitnesse.reporting.history;

import java.io.File;

public class MostRecentPageHistoryReader extends PageHistoryReader {
  TestResultRecord mostRecentRecord = null;
  File directory = null;

  public MostRecentPageHistoryReader(File pageDirectory) {
    directory = pageDirectory;
  }

  public TestResultRecord findMostRecentTestRun() {
    readHistoryFromPageDirectory(directory);
    return mostRecentRecord;
  }

  @Override
  void processTestFile(TestResultRecord record) {
    if (mostRecentRecord == null || mostRecentRecord.getDate().compareTo(record.getDate()) < 0) {
      mostRecentRecord = record;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy