List of usage examples for org.springframework.data.solr.server.support HttpSolrClientFactory HttpSolrClientFactory
public HttpSolrClientFactory(SolrClient solrClient)
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); }