Class TestResultCache


  • public class TestResultCache
    extends java.lang.Object
    Class which maintains a cache of the results currently existing inside a work directory. It is designed to allow the harness to get general information (name, status) about tests without having to open all the result files.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  TestResultCache.Observer
      Interface which allows an external class to monitor the cache's activities.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<TestResult> getTestsToWrite()
      Returns unmodifiable collection of the tests to write.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TestResultCache

        public TestResultCache​(WorkDirectory workDir,
                               TestResultCache.Observer observer)
                        throws java.io.IOException
        Primary constructor for a cache.
        Parameters:
        workDir - the work directory to attach to
        observer - the observer to notify of cache events
        Throws:
        java.io.IOException - if an error occurs reading the cache file
    • Method Detail

      • getTestsToWrite

        public java.util.Collection<TestResult> getTestsToWrite()
        Returns unmodifiable collection of the tests to write.
        Returns:
        unmodifiable collection of the tests to write