Package org.terrier.tests
Class ApplicationSetupBasedTest
- java.lang.Object
-
- org.terrier.tests.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 Summary
Fields Modifier and Type Field Description protected java.lang.String
terrier_etc
protected java.lang.String
terrier_home
org.junit.rules.TestName
testName
org.junit.rules.TemporaryFolder
tmpfolder
-
Constructor Summary
Constructors Constructor Description ApplicationSetupBasedTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addGlobalTerrierProperties(java.util.Properties p)
void
deleteTerrierEtc()
void
makeEnvironment()
protected java.lang.String
writeTemporaryFile(java.lang.String filenamePattern, java.lang.String[] lines)
protected java.lang.String
writeTemporaryFile(java.lang.String filenamePattern, java.lang.String[] lines, java.lang.String charset)
protected java.lang.String
writeTemporaryFolder(java.lang.String dirname)
-
-
-
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()
-
-