## org.apache.lucene.index
Class BaseTermVectorsFormatTestCase

    java.lang.Object
      org.junit.Assert
          org.apache.lucene.util.LuceneTestCase
              org.apache.lucene.index.BaseTermVectorsFormatTestCase

    public abstract class BaseTermVectorsFormatTestCase

extends LuceneTestCase

Base class aiming at testing `term vectors formats`. To test a new format, all you need is to register a new `Codec` which uses it and extend this class and override `getCodec()`.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Nested Class Summary
`protected static class` `BaseTermVectorsFormatTestCase.Options` A combination of term vectors options.
`protected class` `BaseTermVectorsFormatTestCase.RandomDocument`
`protected class` `BaseTermVectorsFormatTestCase.RandomDocumentFactory`
`protected class` `BaseTermVectorsFormatTestCase.RandomTokenStream`

Nested classes/interfaces inherited from class org.apache.lucene.util.LuceneTestCase
`LuceneTestCase.AwaitsFix, LuceneTestCase.BadApple, LuceneTestCase.Nightly, LuceneTestCase.Slow, LuceneTestCase.SuppressCodecs, LuceneTestCase.Weekly`

Field Summary

Fields inherited from class org.apache.lucene.util.LuceneTestCase

`classRules, DEFAULT_LINE_DOCS_FILE, doesntSupportOffsets, INFOSTREAM, JENKINS_LARGE_LINE_DOCS_FILE, PREFLEX_IMPERSONATION_IS_ACTIVE, RANDOM_MULTIPLIER, ruleChain, suiteFailureMarker, SYSPROP_AWAITSFIX, SYSPROP_BADAPPLES, SYSPROP_FAILFAST, SYSPROP_MAXFAILURES, SYSPROP_NIGHTLY, SYSPROP_SLOW, SYSPROP_WEEKLY, TEMP_DIR, TEST_AWAITSFIX, TEST_CODEC, TEST_DIRECTORY, TEST_DOCVALUESFORMAT, TEST_LINE_DOCS_FILE, TEST_NIGHTLY, TEST_POSTINGSFORMAT, TEST_SLOW, TEST_THROTTLING, TEST_VERSION_CURRENT, TEST_WEEKLY, VERBOSE`

Constructor Summary
`BaseTermVectorsFormatTestCase()`

Method Summary
`protected Document` `addId(Document doc, String id)`
`protected void` `assertEquals(BaseTermVectorsFormatTestCase.RandomDocument doc, Fields fields)`
`protected void` `assertEquals(BaseTermVectorsFormatTestCase.RandomTokenStream tk, FieldType ft, Terms terms)`
`protected int` `docID(IndexReader reader, String id)`
`protected static boolean` `equals(Object o1, Object o2)`
`protected FieldType` `fieldType(BaseTermVectorsFormatTestCase.Options options)`
`protected abstract Codec` `getCodec()` Returns the Codec to run tests against
`protected BaseTermVectorsFormatTestCase.Options` `randomOptions()`
`protected BytesRef` `randomPayload()`
`void` `setUp()` For subclasses to override.
`void` `tearDown()` For subclasses to override.
`void` `testClone()`
`void` `testHighFreqs()`
`void` `testLotsOfFields()`
`void` `testMerge()`
`void` `testMixedOptions()`
`void` `testRandom()`
`void` `testRareVectors()`
`protected Set<BaseTermVectorsFormatTestCase.Options>` `validOptions()`

Methods inherited from class org.apache.lucene.util.LuceneTestCase

`assertDeletedDocsEquals, assertDocsAndPositionsEnumEquals, assertDocsEnumEquals, assertDocsSkippingEquals, assertDocValuesEquals, assertDocValuesEquals, assertFieldInfosEquals, assertFieldsEquals, assertFieldStatisticsEquals, assertNormsEquals, assertPositionsSkippingEquals, assertReaderEquals, assertReaderStatisticsEquals, assertSaneFieldCaches, assertStoredFieldEquals, assertStoredFieldsEquals, assertTermsEnumEquals, assertTermsEquals, assertTermsStatisticsEquals, assertTermStatsEquals, assertTermVectorsEquals, asSet, assumeFalse, assumeNoException, assumeTrue, atLeast, atLeast, closeAfterSuite, closeAfterTest, defaultCodecSupportsDocValues, defaultCodecSupportsSortedSet, dumpArray, dumpIterator, getDataFile, getOnlySegmentReader, getTestClass, getTestName, isTestThread, localeForName, maybeWrapReader, newAlcoholicMergePolicy, newAlcoholicMergePolicy, newDirectory, newDirectory, newDirectory, newDirectory, newField, newField, newFSDirectory, newFSDirectory, newIndexWriterConfig, newIndexWriterConfig, newIOContext, newIOContext, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newLogMergePolicy, newMockDirectory, newMockDirectory, newMockFSDirectory, newSearcher, newSearcher, newStringField, newStringField, newTextField, newTextField, newTieredMergePolicy, newTieredMergePolicy, random, randomLocale, randomTimeZone, rarely, rarely, replaceMaxFailureRule, usually, usually`

Methods inherited from class org.junit.Assert

`assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertTrue, assertTrue, fail, fail`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BaseTermVectorsFormatTestCase

    public BaseTermVectorsFormatTestCase()

Method Detail

### getCodec

    protected abstract Codec getCodec()

  Returns the Codec to run tests against

### setUp

    public void setUp()
               throws Exception

  Description copied from class: `LuceneTestCase`
  For subclasses to override. Overrides must call `super.setUp()`.

  Overrides:
    `setUp` in class `LuceneTestCase`
  Throws:
    `Exception`

### tearDown

    public void tearDown()
                  throws Exception

  Description copied from class: `LuceneTestCase`
  For subclasses to override. Overrides must call `super.tearDown()`.

  Overrides:
    `tearDown` in class `LuceneTestCase`
  Throws:
    `Exception`

### validOptions

    protected Set<BaseTermVectorsFormatTestCase.Options> validOptions()

### randomOptions

    protected BaseTermVectorsFormatTestCase.Options randomOptions()

### fieldType

    protected FieldType fieldType(BaseTermVectorsFormatTestCase.Options options)

### randomPayload

    protected BytesRef randomPayload()

### assertEquals

    protected void assertEquals(BaseTermVectorsFormatTestCase.RandomDocument doc,
                                Fields fields)
                         throws IOException

  Throws:
    `IOException`

### equals

    protected static boolean equals(Object o1,
                                    Object o2)

### assertEquals

    protected void assertEquals(BaseTermVectorsFormatTestCase.RandomTokenStream tk,
                                FieldType ft,
                                Terms terms)
                         throws IOException

  Throws:
    `IOException`

### addId

    protected Document addId(Document doc,
                             String id)

### docID

    protected int docID(IndexReader reader,
                        String id)
                 throws IOException

  Throws:
    `IOException`

### testRareVectors

    public void testRareVectors()
                         throws IOException

  Throws:
    `IOException`

### testHighFreqs

    public void testHighFreqs()
                       throws IOException

  Throws:
    `IOException`

### testLotsOfFields

    public void testLotsOfFields()
                          throws IOException

  Throws:
    `IOException`

### testMixedOptions

    public void testMixedOptions()
                          throws IOException

  Throws:
    `IOException`

### testRandom

    public void testRandom()
                    throws IOException

  Throws:
    `IOException`

### testMerge

    public void testMerge()
                   throws IOException

  Throws:
    `IOException`

### testClone

    public void testClone()
                   throws IOException,
                          InterruptedException

  Throws:
    `IOException`
    `InterruptedException`

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.