Methods Summary |
---|
protected void | setUp()
super.setUp();
|
protected void | tearDown()
super.tearDown();
|
public void | testCheckRequieredValues()
IndexSchemaField f = new IndexSchemaField();
assertFalse(f.checkRequieredValues());
f.setName("someName");
assertFalse(f.checkRequieredValues());
f.setPath("somePath");
assertFalse(f.checkRequieredValues());
f.setType("text");
assertTrue(f.checkRequieredValues());
f.setType("mixed");
assertFalse(f.checkRequieredValues());
f.setTypePath("sometypepath");
assertTrue(f.checkRequieredValues());
f.setType("custom");
assertFalse(f.checkRequieredValues());
f.setFieldClass(TestContentStragtegy.class);
assertTrue(f.checkRequieredValues());
|
public void | testSetFieldType()
IndexSchemaField f = new IndexSchemaField();
f.setFieldClass(TestContentStragtegy.class);
try{
f.setFieldClass(PlainTextStrategy.class);
fail("no pub const.");
}catch (RuntimeException e) {
}
try{
f.setFieldClass(null);
fail("is null");
}catch (RuntimeException e) {
}
|
public void | testSetIndexByName()
IndexSchemaField f = new IndexSchemaField();
f.setIndexByName("UN_done");
assertEquals(Field.Index.TOKENIZED,f.getIndex());
f.setIndexByName("UN_tokenized");
assertEquals(Field.Index.UN_TOKENIZED,f.getIndex());
f.setIndexByName("tokenized");
assertEquals(Field.Index.TOKENIZED,f.getIndex());
f.setIndexByName("no");
assertEquals(Field.Index.NO,f.getIndex());
f.setIndexByName("no_norms");
assertEquals(Field.Index.NO_NORMS,f.getIndex());
|
public void | testSetStoreByName()
IndexSchemaField f = new IndexSchemaField();
f.setStoreByName("someother");
assertEquals(Field.Store.NO,f.getStore());
f.setStoreByName("COMPRESS");
assertEquals(Field.Store.COMPRESS,f.getStore());
f.setStoreByName("YeS");
assertEquals(Field.Store.YES,f.getStore());
f.setStoreByName("No");
assertEquals(Field.Store.NO,f.getStore());
|
public void | testSetType()
IndexSchemaField f = new IndexSchemaField();
f.setType("notatype");
assertNull(f.getContentType());
f.setType("custom");
assertEquals(ContentType.CUSTOM,f.getContentType());
f.setType("text");
assertEquals(ContentType.TEXT,f.getContentType());
|
public void | testSetboost()
IndexSchemaField f = new IndexSchemaField();
f.setBoost(-0.1f);
assertEquals(1.0f,f.getBoost());
f.setBoost(2.50f);
assertEquals(2.50f,f.getBoost());
|
public void | testToSTringNoNullPEx()
assertNotNull(new IndexSchemaField().toString());
|