Methods Summary |
---|
protected void | setUp()
this.delDocument = new GDataIndexDocument(IndexAction.DELETE,ENTRYID,FEEDID,false,true);
this.insDocument = new GDataIndexDocument(IndexAction.INSERT,ENTRYID,FEEDID,true,false);
this.updDocument = new GDataIndexDocument(IndexAction.UPDATE,ENTRYID,FEEDID,false,true);
|
protected void | tearDown()
super.tearDown();
|
public void | testAddField()
assertEquals(0,this.delDocument.fields.size());
this.delDocument.addField(null);
assertEquals(0,this.delDocument.fields.size());
IndexSchemaField ifield = new IndexSchemaField();
ifield.setContentType(ContentType.TEXT);
this.delDocument.addField(ContentStrategy.getFieldStrategy(ifield));
assertEquals(1,this.delDocument.fields.size());
|
public void | testCommitAfter()
assertTrue(this.insDocument.commitAfter());
assertFalse(this.updDocument.commitAfter());
assertFalse(this.delDocument.commitAfter());
|
public void | testGetDeletealbe()
assertNotNull(this.insDocument.getDeletealbe());
Term t = this.insDocument.getDeletealbe();
assertEquals(IndexDocument.FIELD_ENTRY_ID,t.field());
assertEquals(ENTRYID,t.text());
|
public void | testGetWriteable()
assertNotNull(this.insDocument.getWriteable());
Document doc = this.insDocument.getWriteable();
assertEquals(2,doc.getFields().size());
assertEquals(ENTRYID,doc.getField(GDataIndexDocument.FIELD_ENTRY_ID).stringValue());
assertEquals(FEEDID,doc.getField(GDataIndexDocument.FIELD_FEED_ID).stringValue());
|
public void | testIsDelete()
assertFalse(this.insDocument.isDelete());
assertFalse(this.updDocument.isDelete());
assertTrue(this.delDocument.isDelete());
|
public void | testIsInsert()
assertTrue(this.insDocument.isInsert());
assertFalse(this.updDocument.isInsert());
assertFalse(this.delDocument.isInsert());
|
public void | testIsUpdate()
assertFalse(this.insDocument.isUpdate());
assertTrue(this.updDocument.isUpdate());
assertFalse(this.delDocument.isUpdate());
|
public void | testOptimizeAfter()
assertFalse(this.insDocument.optimizeAfter());
assertTrue(this.updDocument.optimizeAfter());
assertTrue(this.delDocument.optimizeAfter());
|