Class ApplicationSetupBasedTest

  • Direct Known Subclasses:
    BatchEndToEndTest, CheckClosedStreams

    public class ApplicationSetupBasedTest
    extends java.lang.Object
    Base class for a test that requires ApplicationSetup to be correctly initialised. Uses a JUnit-created temporary folder, and invokes TRECSetup on it, to ensure that a default configuration is generated.
    Author:
    Craig Macdonald
    • Field Detail

      • tmpfolder

        public org.junit.rules.TemporaryFolder tmpfolder
      • testName

        public org.junit.rules.TestName testName
      • terrier_home

        protected java.lang.String terrier_home
      • terrier_etc

        protected java.lang.String terrier_etc
    • Constructor Detail

      • ApplicationSetupBasedTest

        public ApplicationSetupBasedTest()
    • Method Detail

      • makeEnvironment

        public void makeEnvironment()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • writeTemporaryFile

        protected java.lang.String writeTemporaryFile​(java.lang.String filenamePattern,
                                                      java.lang.String[] lines)
                                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • writeTemporaryFile

        protected java.lang.String writeTemporaryFile​(java.lang.String filenamePattern,
                                                      java.lang.String[] lines,
                                                      java.lang.String charset)
                                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • writeTemporaryFolder

        protected java.lang.String writeTemporaryFolder​(java.lang.String dirname)
                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addGlobalTerrierProperties

        protected void addGlobalTerrierProperties​(java.util.Properties p)
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • deleteTerrierEtc

        public void deleteTerrierEtc()