Class TestUtil
General utility methods for Lucene unit tests.
Inheritance
Assembly: Lucene.Net.TestFramework.dll
Syntax
public static class TestUtil : object
Fields
Name | Description |
---|---|
WHITESPACE_CHARACTERS | List of characters that match |
Methods
Name | Description |
---|---|
AlwaysDocValuesFormat(DocValuesFormat) | Return a Codec that can read any of the default codecs and formats, but always writes in the specified format. |
AlwaysPostingsFormat(PostingsFormat) | Return a Codec that can read any of the default codecs and formats, but always writes in the specified format. |
AnyFilesExceptWriteLock(Directory) | |
AssertAttributeReflection(Attribute, IDictionary<String, Object>) | Checks some basic behaviour of an AttributeImpl |
AssertEquals(TopDocs, TopDocs) | |
BytesToCharSequence(BytesRef, Random) | |
CheckIndex(Directory) | this runs the CheckIndex tool on the index in. If any issues are hit, a RuntimeException is thrown; else, true is returned. |
CheckIndex(Directory, Boolean) | |
CheckReader(AtomicReader, Boolean) | |
CheckReader(IndexReader) | this runs the CheckIndex tool on the Reader. If any issues are hit, a RuntimeException is thrown |
CloneDocument(Documents.Document) | |
Docs(Random, IndexReader, String, BytesRef, IBits, DocsEnum, DocsFlags) | |
Docs(Random, TermsEnum, IBits, DocsEnum, DocsFlags) | |
FieldSupportsHugeBinaryDocValues(String) | |
GetDocValuesFormat(Codec, String) | |
GetDocValuesFormat(String) | |
GetPostingsFormat(Codec, String) | |
GetPostingsFormat(String) | |
NextInt(Random, Int32, Int32) | start and end are BOTH inclusive |
NextLong(Random, Int64, Int64) | start and end are BOTH inclusive |
RandomAnalysisString(Random, Int32, Boolean) | |
RandomFilterStrategy(Random) | |
RandomFixedByteLengthUnicodeString(Random, Int32) | Returns random string, with a given UTF-8 byte length |
RandomFixedLengthUnicodeString(Random, Char[], Int32, Int32) | Fills provided char[] with valid random unicode code unit sequence. |
RandomHtmlishString(Random, Int32) | |
RandomlyRecaseString(Random, String) | Randomly upcases, downcases, or leaves intact each code point in the given string |
RandomPattern(Random) | Returns a valid (compiling) Pattern instance with random stuff inside. Be careful when applying random patterns to longer strings as certain types of patterns may explode into exponential times in backtracking implementations (such as Java's). |
RandomRealisticUnicodeString(Random) | Returns random string of length between 0-20 codepoints, all codepoints within the same unicode block. |
RandomRealisticUnicodeString(Random, Int32) | Returns random string of length up to maxLength codepoints , all codepoints within the same unicode block. |
RandomRealisticUnicodeString(Random, Int32, Int32) | Returns random string of length between min and max codepoints, all codepoints within the same unicode block. |
RandomRegexpishString(Random) | Returns a String thats "regexpish" (contains lots of operators typically found in regular expressions) If you call this enough times, you might get a valid regex! |
RandomRegexpishString(Random, Int32) | |
RandomSimpleString(Random) | |
RandomSimpleString(Random, Int32) | |
RandomSimpleString(Random, Int32, Int32) | |
RandomSimpleStringRange(Random, Char, Char, Int32) | |
RandomSubString(Random, Int32, Boolean) | |
RandomUnicodeString(Random) | Returns random string, including full unicode range. |
RandomUnicodeString(Random, Int32) | Returns a random string up to a certain length. |
RandomWhitespace(Random, Int32, Int32) | |
ReduceOpenFiles(IndexWriter) | just tries to configure things to keep the open file count lowish |
Rm(DirectoryInfo[]) | |
ShutdownExecutorService(TaskScheduler) | Shutdown |
StringToCharSequence(String, Random) | |
SyncConcurrentMerges(IMergeScheduler) | |
SyncConcurrentMerges(IndexWriter) | |
ToByteArray(SByte[]) | |
Unzip(Stream, DirectoryInfo) |