use of org.neo4j.kernel.impl.api.scan.LabelScanStoreProvider in project neo4j by neo4j.
the class NamedLabelScanStoreSelectionStrategyTest method shouldAutoSelectSingleProviderWithPresentStore.
@Test
public void shouldAutoSelectSingleProviderWithPresentStore() throws Exception {
// GIVEN
NamedLabelScanStoreSelectionStrategy strategy = strategy(LabelIndex.AUTO);
LabelScanStoreProvider nativeProvider = provider(LabelIndex.NATIVE, store(true));
// WHEN
LabelScanStoreProvider selected = select(strategy, nativeProvider);
// THEN
assertSame(nativeProvider, selected);
}
use of org.neo4j.kernel.impl.api.scan.LabelScanStoreProvider in project neo4j by neo4j.
the class NamedLabelScanStoreSelectionStrategyTest method shouldFailOnMissingSpecificallyConfiguredProvider.
@Test
public void shouldFailOnMissingSpecificallyConfiguredProvider() throws Exception {
// GIVEN
NamedLabelScanStoreSelectionStrategy strategy = strategy(LabelIndex.LUCENE);
LabelScanStoreProvider nativeProvider = provider(LabelIndex.NATIVE, store(false));
// WHEN
try {
select(strategy, nativeProvider);
fail("Should've failed");
} catch (IllegalArgumentException e) {
// THEN good
}
}
Aggregations