use of org.neo4j.kernel.impl.api.legacyindex.InternalAutoIndexing in project neo4j by neo4j.
the class IndexQueryTransactionStateTest method before.
@Before
public void before() throws Exception {
TransactionState txState = new TxState();
state = StatementOperationsTestHelper.mockedState(txState);
store = mock(StoreReadLayer.class);
when(store.indexGetState(newIndexDescriptor)).thenReturn(InternalIndexState.ONLINE);
when(store.indexesGetForLabel(labelId)).then(answerAsIteratorFrom(indexes));
when(store.indexesGetAll()).then(answerAsIteratorFrom(indexes));
when(store.constraintsGetForLabel(labelId)).thenReturn(Collections.emptyIterator());
when(store.indexGetForLabelAndPropertyKey(newIndexDescriptor.schema())).thenReturn(newIndexDescriptor);
statement = mock(StoreStatement.class);
when(state.getStoreStatement()).thenReturn(statement);
indexReader = mock(IndexReader.class);
when(statement.getIndexReader(newIndexDescriptor)).thenReturn(indexReader);
when(statement.getFreshIndexReader(newIndexDescriptor)).thenReturn(indexReader);
StateHandlingStatementOperations stateHandlingOperations = new StateHandlingStatementOperations(store, new InternalAutoIndexing(Config.empty(), null), mock(ConstraintIndexCreator.class), mock(LegacyIndexStore.class));
txContext = new ConstraintEnforcingEntityOperations(new StandardConstraintSemantics(), stateHandlingOperations, stateHandlingOperations, stateHandlingOperations, stateHandlingOperations);
}
Aggregations