use of com.yahoo.elide.core.datastore.inmemory.InMemoryStoreTransaction in project elide by yahoo.
the class DataStoreLoadTest method testPrefixPredicateWithInMemoryFiltering.
@Test
public void testPrefixPredicateWithInMemoryFiltering() throws Exception {
DataStoreTransaction testTransaction = searchStore.beginReadTransaction();
testTransaction = new InMemoryStoreTransaction(testTransaction);
// Case sensitive query against case insensitive index must lowercase
FilterExpression filter = filterParser.parseFilterExpression("name==dru*", ClassType.of(Item.class), false);
Iterable<Object> loaded = testTransaction.loadObjects(EntityProjection.builder().type(Item.class).filterExpression(filter).build(), mockScope);
assertListContains(loaded, Lists.newArrayList());
verify(wrappedTransaction, never()).loadObjects(any(), any());
}
Aggregations