use of com.torodb.core.transaction.metainf.ImmutableMetaDatabase in project torodb by torodb.
the class IdentifierFactoryImplTest method longForCounterDocPartToIdentifierTest.
@Test
public void longForCounterDocPartToIdentifierTest() {
ImmutableMetaDatabase metaDatabase = new ImmutableMetaDatabase.Builder("database", "database").build();
String identifier = identifierFactory.toDocPartIdentifier(metaDatabase, "collecti", createTableRef("long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long"));
Assert.assertEquals("collecti_long_long_long_long_long_long_long_long_long_long_longong_long_long_long_long_long_long_long_long_long_long_long_long_1", identifier);
}
use of com.torodb.core.transaction.metainf.ImmutableMetaDatabase in project torodb by torodb.
the class IdentifierFactoryImplTest method emptyDocPartToIdentifierTest.
@Test
public void emptyDocPartToIdentifierTest() {
ImmutableMetaDatabase metaDatabase = new ImmutableMetaDatabase.Builder("database", "database").build();
String identifier = identifierFactory.toDocPartIdentifier(metaDatabase, "collecti", createTableRef(""));
Assert.assertEquals("collecti_", identifier);
}
use of com.torodb.core.transaction.metainf.ImmutableMetaDatabase 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;
}
};
}
Aggregations