Search in sources :

Example 1 with WrapperMutableMetaDatabase

use of com.torodb.core.transaction.metainf.WrapperMutableMetaDatabase in project torodb by torodb.

the class D2RTranslationBatchFunctionTest method setUp.

@Before
public void setUp() {
    metaDb = new WrapperMutableMetaDatabase(new ImmutableMetaDatabase("dbName", "dbId", Collections.emptyList()), (o) -> {
    });
    metaCol = metaDb.addMetaCollection("colName", "colId");
    translatorFactory = mock(D2RTranslatorFactory.class);
    fun = new D2RTranslationBatchFunction(translatorFactory, metaDb, metaCol) {

        @Override
        protected BatchMetaCollection createMetaDocCollection(MutableMetaCollection metaCol) {
            batchMetaCol = spy(super.createMetaDocCollection(metaCol));
            return batchMetaCol;
        }
    };
}
Also used : KvDocument(com.torodb.kvdocument.values.KvDocument) WrapperMutableMetaCollection(com.torodb.core.transaction.metainf.WrapperMutableMetaCollection) Test(org.junit.Test) D2RTranslatorFactory(com.torodb.core.d2r.D2RTranslatorFactory) Mockito(org.mockito.Mockito) MutableMetaCollection(com.torodb.core.transaction.metainf.MutableMetaCollection) List(java.util.List) Lists(com.google.common.collect.Lists) BDDMockito.given(org.mockito.BDDMockito.given) WrapperMutableMetaDatabase(com.torodb.core.transaction.metainf.WrapperMutableMetaDatabase) CollectionData(com.torodb.core.d2r.CollectionData) D2RTranslator(com.torodb.core.d2r.D2RTranslator) ImmutableMetaDatabase(com.torodb.core.transaction.metainf.ImmutableMetaDatabase) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) Before(org.junit.Before) WrapperMutableMetaDatabase(com.torodb.core.transaction.metainf.WrapperMutableMetaDatabase) WrapperMutableMetaCollection(com.torodb.core.transaction.metainf.WrapperMutableMetaCollection) MutableMetaCollection(com.torodb.core.transaction.metainf.MutableMetaCollection) ImmutableMetaDatabase(com.torodb.core.transaction.metainf.ImmutableMetaDatabase) D2RTranslatorFactory(com.torodb.core.d2r.D2RTranslatorFactory) Before(org.junit.Before)

Aggregations

Lists (com.google.common.collect.Lists)1 CollectionData (com.torodb.core.d2r.CollectionData)1 D2RTranslator (com.torodb.core.d2r.D2RTranslator)1 D2RTranslatorFactory (com.torodb.core.d2r.D2RTranslatorFactory)1 ImmutableMetaDatabase (com.torodb.core.transaction.metainf.ImmutableMetaDatabase)1 MutableMetaCollection (com.torodb.core.transaction.metainf.MutableMetaCollection)1 WrapperMutableMetaCollection (com.torodb.core.transaction.metainf.WrapperMutableMetaCollection)1 WrapperMutableMetaDatabase (com.torodb.core.transaction.metainf.WrapperMutableMetaDatabase)1 KvDocument (com.torodb.kvdocument.values.KvDocument)1 Collections (java.util.Collections)1 List (java.util.List)1 Assert.assertEquals (org.junit.Assert.assertEquals)1 Before (org.junit.Before)1 Test (org.junit.Test)1 BDDMockito.given (org.mockito.BDDMockito.given)1 Mockito (org.mockito.Mockito)1