Test method for 'org.apache.lucene.gdata.search.index.GDataIndexWriter.GDataIndexWriter(Directory, boolean, IndexSchema)'
try{
new GDataIndexWriter(new RAMDirectory(),true,null);
fail("no index schema");
}catch (IllegalArgumentException e) {}
GDataIndexWriter writer = new GDataIndexWriter(new RAMDirectory(),true,this.schemaNoPerFielAnalyzer);
assertTrue(writer.getAnalyzer().getClass() == StandardAnalyzer.class);
writer = new GDataIndexWriter(new RAMDirectory(),true,this.schemaPerFielAnalyzer);
assertTrue(writer.getAnalyzer().getClass() == PerFieldAnalyzerWrapper.class);
//TODO fix this - index writer has no commitlocktimeout setter anymore (lockless commits)
// assertEquals(VALUE_GT_DEFAULT_LONG,writer.getCommitLockTimeout());
assertEquals(VALUE_GT_DEFAULT_LONG,writer.getWriteLockTimeout());
assertEquals(VALUE_GT_DEFAULT_INT,writer.getMaxBufferedDocs());
assertEquals(VALUE_GT_DEFAULT_INT,writer.getMaxMergeDocs());
assertEquals(VALUE_GT_DEFAULT_INT,writer.getMaxFieldLength());
assertEquals(VALUE_GT_DEFAULT_INT,writer.getMergeFactor());
assertTrue(writer.getUseCompoundFile());