add missing javadoc to base test classes

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@990189 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2010-08-27 16:15:00 +00:00
parent bbfbc428ca
commit e30c1307ee
2 changed files with 30 additions and 0 deletions

View File

@ -333,6 +333,16 @@ public abstract class LuceneTestCase extends TestCase {
return LuceneTestCaseJ4.newIndexWriterConfig(r, v, a); return LuceneTestCaseJ4.newIndexWriterConfig(r, v, a);
} }
/**
* Returns a new Dictionary instance. Use this when the test does not
* care about the specific Directory implementation (most tests).
* <p>
* The Directory is wrapped with {@link MockDirectoryWrapper}.
* By default this means it will be picky, such as ensuring that you
* properly close it and all open files in your test. It will emulate
* some features of Windows, such as not allowing open files to be
* overwritten.
*/
public MockDirectoryWrapper newDirectory(Random r) throws IOException { public MockDirectoryWrapper newDirectory(Random r) throws IOException {
StackTraceElement[] stack = new Exception().getStackTrace(); StackTraceElement[] stack = new Exception().getStackTrace();
Directory impl = LuceneTestCaseJ4.newDirectoryImpl(r, TEST_DIRECTORY); Directory impl = LuceneTestCaseJ4.newDirectoryImpl(r, TEST_DIRECTORY);
@ -341,6 +351,11 @@ public abstract class LuceneTestCase extends TestCase {
return dir; return dir;
} }
/**
* Returns a new Dictionary instance, with contents copied from the
* provided directory. See {@link #newDirectory(Random)} for more
* information.
*/
public MockDirectoryWrapper newDirectory(Random r, Directory d) throws IOException { public MockDirectoryWrapper newDirectory(Random r, Directory d) throws IOException {
StackTraceElement[] stack = new Exception().getStackTrace(); StackTraceElement[] stack = new Exception().getStackTrace();
Directory impl = LuceneTestCaseJ4.newDirectoryImpl(r, TEST_DIRECTORY); Directory impl = LuceneTestCaseJ4.newDirectoryImpl(r, TEST_DIRECTORY);

View File

@ -591,6 +591,16 @@ public class LuceneTestCaseJ4 {
return c; return c;
} }
/**
* Returns a new Dictionary instance. Use this when the test does not
* care about the specific Directory implementation (most tests).
* <p>
* The Directory is wrapped with {@link MockDirectoryWrapper}.
* By default this means it will be picky, such as ensuring that you
* properly close it and all open files in your test. It will emulate
* some features of Windows, such as not allowing open files to be
* overwritten.
*/
public static MockDirectoryWrapper newDirectory(Random r) throws IOException { public static MockDirectoryWrapper newDirectory(Random r) throws IOException {
StackTraceElement[] stack = new Exception().getStackTrace(); StackTraceElement[] stack = new Exception().getStackTrace();
Directory impl = newDirectoryImpl(r, TEST_DIRECTORY); Directory impl = newDirectoryImpl(r, TEST_DIRECTORY);
@ -599,6 +609,11 @@ public class LuceneTestCaseJ4 {
return dir; return dir;
} }
/**
* Returns a new Dictionary instance, with contents copied from the
* provided directory. See {@link #newDirectory(Random)} for more
* information.
*/
public static MockDirectoryWrapper newDirectory(Random r, Directory d) throws IOException { public static MockDirectoryWrapper newDirectory(Random r, Directory d) throws IOException {
StackTraceElement[] stack = new Exception().getStackTrace(); StackTraceElement[] stack = new Exception().getStackTrace();
Directory impl = newDirectoryImpl(r, TEST_DIRECTORY); Directory impl = newDirectoryImpl(r, TEST_DIRECTORY);