Package com.sematext.searchschemer.reader.solr

Source Code of com.sematext.searchschemer.reader.solr.SolrDynamicFieldsDefinitionReaderTest

package com.sematext.searchschemer.reader.solr;

import java.io.File;

import junit.framework.TestCase;

import org.junit.Test;

import com.sematext.searchschemer.index.FieldAttributes;
import com.sematext.searchschemer.type.FieldType;

public class SolrDynamicFieldsDefinitionReaderTest extends TestCase
  @Test
  public void testParseDynamicFields() throws Exception {
    SolrDynamicFieldsDefinitionReader reader = new SolrDynamicFieldsDefinitionReader(new File(getClass().getClassLoader()
        .getResource("solr/test_schema_small_dynamic.xml").getFile()));
    assertEquals(1, reader.readFields().size());
    FieldAttributes field = reader.readFields().get(0);
    assertNotNull(field);
    assertEquals("*_i", field.name());
    assertEquals(FieldType.INTEGER, field.fieldType());
  }
}
TOP

Related Classes of com.sematext.searchschemer.reader.solr.SolrDynamicFieldsDefinitionReaderTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.