Search in sources :

Example 11 with OIndexUnique

use of com.orientechnologies.orient.core.index.OIndexUnique in project orientdb by orientechnologies.

the class OChainedIndexProxyFindBestIndexTest method mockUniqueHashIndex.

private OIndexUnique mockUniqueHashIndex() {
    final OIndexUnique uniqueIndex = mock(OIndexUnique.class);
    when(uniqueIndex.getInternal()).thenReturn(uniqueIndex);
    final OIndexDefinition definition = mock(OIndexDefinition.class);
    when(definition.getParamCount()).thenReturn(1);
    when(uniqueIndex.getDefinition()).thenReturn(definition);
    when(uniqueIndex.getType()).thenReturn(OClass.INDEX_TYPE.UNIQUE_HASH_INDEX.toString());
    return uniqueIndex;
}
Also used : OIndexDefinition(com.orientechnologies.orient.core.index.OIndexDefinition) OIndexUnique(com.orientechnologies.orient.core.index.OIndexUnique)

Aggregations

OIndexUnique (com.orientechnologies.orient.core.index.OIndexUnique)11 OIndexDefinition (com.orientechnologies.orient.core.index.OIndexDefinition)6 OIndex (com.orientechnologies.orient.core.index.OIndex)5 Test (org.testng.annotations.Test)5 ODocument (com.orientechnologies.orient.core.record.impl.ODocument)2