Skip to content

Commit

Permalink
ISPN-2131 Migrate SimpleFacetingTest to new Configuration API
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanne committed Jun 26, 2012
1 parent b76cec5 commit 2e1c21c
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.hibernate.search.query.dsl.QueryBuilder;
import org.hibernate.search.query.facet.Facet;
import org.hibernate.search.query.facet.FacetingRequest;
import org.infinispan.config.Configuration;
import org.infinispan.configuration.cache.ConfigurationBuilder;
import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.query.CacheQuery;
import org.infinispan.query.Search;
Expand All @@ -38,27 +38,31 @@
import org.infinispan.test.fwk.TestCacheManagerFactory;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import static junit.framework.Assert.assertEquals;

/**
* @author Sanne Grinovero <sanne@hibernate.org> (C) 2011 Red Hat Inc.
* @author Hardy Ferentschik
*/
@Test(groups = "functional", testName = "query.faceting.SimpleFacetingTest")
public class SimpleFacetingTest extends SingleCacheManagerTest {

private final String indexFieldName = "cubicCapacity";
private final String facetName = "ccs";
private static final String indexFieldName = "cubicCapacity";
private static final String facetName = "ccs";

private SearchManager qf;

protected EmbeddedCacheManager createCacheManager() throws Exception {
Configuration c = getDefaultStandaloneConfig(true);
c.fluent()
ConfigurationBuilder cfg = getDefaultStandaloneCacheConfig(true);
cfg
.indexing()
.indexLocalOnly(false)
.addProperty("hibernate.search.default.directory_provider", "ram");
return TestCacheManagerFactory.createCacheManager(c);
.enable()
.indexLocalOnly(false)
.addProperty("hibernate.search.default.directory_provider", "ram")
.addProperty("hibernate.search.lucene_version", "LUCENE_CURRENT");
return TestCacheManagerFactory.createCacheManager(cfg);
}

@BeforeClass
Expand Down

0 comments on commit 2e1c21c

Please sign in to comment.