fitnesse.reporting.history.MostRecentPageHistoryReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fitnesse Show documentation
Show all versions of fitnesse Show documentation
The fully integrated standalone wiki, and acceptance testing framework.
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;
}
}
}