Example usage for org.springframework.data.solr.server.support HttpSolrClientFactory HttpSolrClientFactory

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

Introduction

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

Prototype

public HttpSolrClientFactory(SolrClient solrClient) 

Source Link

Usage

From source file:org.springframework.data.solr.HttpSolrClientFactoryTests.java

@Test
public void testInitFactory() {
    HttpSolrClientFactory factory = new HttpSolrClientFactory(solrClient);
    Assert.assertNotNull(factory.getCores());
    Assert.assertThat(factory.getCores(), IsEmptyCollection.emptyCollectionOf(String.class));
    Assert.assertEquals(solrClient, factory.getSolrClient());
    Assert.assertEquals(URL, ((HttpSolrClient) factory.getSolrClient()).getBaseURL());
}

From source file:org.springframework.data.solr.HttpSolrClientFactoryTests.java

@Test
public void testFactoryReturnsReferenceSolrClientWhenCallingGetWithCoreNameAndNoCoreSet() {
    HttpSolrClientFactory factory = new HttpSolrClientFactory(solrClient);
    Assert.assertEquals(solrClient, factory.getSolrClient("AnyCoreName"));
}

From source file:org.springframework.data.solr.HttpSolrClientFactoryTests.java

@Test(expected = IllegalArgumentException.class)
public void testInitFactoryWithNullServer() {
    new HttpSolrClientFactory(null);
}