Example usage for org.springframework.data.solr.server.support SolrClientUtils resolveSolrCoreName

List of usage examples for org.springframework.data.solr.server.support SolrClientUtils resolveSolrCoreName

Introduction

In this page you can find the example usage for org.springframework.data.solr.server.support SolrClientUtils resolveSolrCoreName.

Prototype

public static String resolveSolrCoreName(Class<?> type) 

Source Link

Document

Resolve solr core/collection name for given type.

Usage

From source file:org.springframework.data.solr.server.support.SolrClientUtilTests.java

@Test
public void testResolveSolrCoreNameShouldReturnEmptyStringWhenNoAnnotationPresent() {
    Assert.assertThat(SolrClientUtils.resolveSolrCoreName(ClassWithoutSolrDocumentAnnotation.class),
            isEmptyString());/*from   w ww .j  a  v  a 2 s .  com*/
}

From source file:org.springframework.data.solr.server.support.SolrClientUtilTests.java

@Test
public void testResolveSolrCoreNameShouldReturnEmptyStringWhenAnnotationHasNoValue() {
    Assert.assertThat(SolrClientUtils.resolveSolrCoreName(ClassWithEmptySolrDocumentAnnotation.class),
            isEmptyString());//from   ww  w  .j  a v  a 2  s . co m
}

From source file:org.springframework.data.solr.server.support.SolrClientUtilTests.java

@Test
public void testResolveSolrCoreNameShouldReturnAnnotationValueWhenPresent() {
    Assert.assertThat(SolrClientUtils.resolveSolrCoreName(ClassWithSolrDocumentAnnotation.class),
            equalTo("core1"));
}