Package org.springframework.data.solr.core.schema.SchemaDefinition

Examples of org.springframework.data.solr.core.schema.SchemaDefinition.FieldDefinition


   */
  @SuppressWarnings("unchecked")
  @Test
  public void idPropertyShouldBeResolvedCorrectly() {

    FieldDefinition fieldDef = schemaResolver.createFieldDefinitionForProperty(getPropertyFor("id", Foo.class));
    assertThat(
        fieldDef,
        allOf(hasProperty("name", equalTo("id")), hasProperty("multiValued", equalTo(false)),
            hasProperty("indexed", equalTo(true)), hasProperty("stored", equalTo(true)),
            hasProperty("type", equalTo("string")), hasProperty("defaultValue", equalTo(null))));
View Full Code Here


   * @see DATASOLR-72
   */
  @Test
  public void transientPropertyShouldNotBeMapped() {

    FieldDefinition fieldDef = schemaResolver.createFieldDefinitionForProperty(getPropertyFor("transientProperty",
        Foo.class));
    assertThat(fieldDef, nullValue());
  }
View Full Code Here

   * @see DATASOLR-72
   */
  @Test
  public void namedPropertyShouldBeMappedCorrectly() {

    FieldDefinition fieldDef = schemaResolver.createFieldDefinitionForProperty(getPropertyFor("namedStringProperty",
        Foo.class));
    assertThat(fieldDef, hasProperty("name", equalTo("customName")));
  }
View Full Code Here

   * @see DATASOLR-72
   */
  @Test
  public void untypedPropertyShouldBeMappedCorrectly() {

    FieldDefinition fieldDef = schemaResolver.createFieldDefinitionForProperty(getPropertyFor("someStringProperty",
        Foo.class));
    assertThat(fieldDef, hasProperty("type", equalTo("string")));
  }
View Full Code Here

   * @see DATASOLR-72
   */
  @Test
  public void typedPropertyShouldBeMappedCorrectly() {

    FieldDefinition fieldDef = schemaResolver.createFieldDefinitionForProperty(getPropertyFor("solrTypedProperty",
        Foo.class));
    assertThat(fieldDef, hasProperty("type", equalTo("tdouble")));
  }
View Full Code Here

   * @see DATASOLR-72
   */
  @Test
  public void defaultValueShouldBeMappedCorrectly() {

    FieldDefinition fieldDef = schemaResolver.createFieldDefinitionForProperty(getPropertyFor("stringWithDefaultValue",
        Foo.class));
    assertThat(fieldDef, hasProperty("defaultValue", equalTo("foo")));
  }
View Full Code Here

   * @see DATASOLR-72
   */
  @Test
  public void readonlyPropertyShouldNotBeMapped() {

    FieldDefinition fieldDef = schemaResolver.createFieldDefinitionForProperty(getPropertyFor("readonlyProperty",
        Foo.class));
    assertThat(fieldDef, nullValue());
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.solr.core.schema.SchemaDefinition.FieldDefinition

Copyright © 2018 www.massapicom. 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.