Exemplo n.º 1
0
  public SolrTemplate(SolrServerFactory solrServerFactory, SolrConverter solrConverter) {
    Assert.notNull(solrServerFactory, "SolrServerFactory must not be 'null'.");
    Assert.notNull(
        solrServerFactory.getSolrServer(), "SolrServerFactory has to return a SolrServer.");

    this.solrServerFactory = solrServerFactory;
    this.solrConverter = solrConverter == null ? getDefaultSolrConverter() : solrConverter;
  }
Exemplo n.º 2
0
 @Override
 public final SolrServer getSolrServer() {
   return solrServerFactory.getSolrServer(this.solrCore);
 }
  @Before
  public void setUp() {

    Mockito.when(factoryMock.getSolrServer(Mockito.anyString())).thenReturn(solrServerMock);
    writer = new SolrSchemaWriter(factoryMock);
  }