use of com.torodb.core.transaction.metainf.ImmutableMetaDocPart in project torodb by torodb.
the class BatchMetaCollectionTest method setUp.
@Before
public void setUp() {
ImmutableMetaCollection immutableCollection = new ImmutableMetaCollection.Builder("colName", "colId").put(new ImmutableMetaDocPart(tableRefFactory.createRoot(), "docPartName")).build();
delegate = Mockito.spy(new WrapperMutableMetaCollection(immutableCollection, (o) -> {
}));
collection = new BatchMetaCollection(delegate);
}
use of com.torodb.core.transaction.metainf.ImmutableMetaDocPart in project torodb by torodb.
the class BatchMetaDocPartTest method setUp.
@Before
@SuppressWarnings("unchecked")
public void setUp() throws Exception {
testChangeConsumer = mock(Consumer.class);
delegateChangeConsumer = mock(Consumer.class);
delegate = new WrapperMutableMetaDocPart(new ImmutableMetaDocPart(tableRefFactory.createRoot(), "docPartId"), delegateChangeConsumer);
docPart = new BatchMetaDocPart(delegate, testChangeConsumer, true);
}
use of com.torodb.core.transaction.metainf.ImmutableMetaDocPart in project torodb by torodb.
the class IdentifierFactoryImplTest method emptyFieldToIdentifierTest.
@Test
public void emptyFieldToIdentifierTest() {
ImmutableMetaDocPart metaDocPart = new ImmutableMetaDocPart.Builder(createTableRef(), "docpart").build();
String identifier = identifierFactory.toFieldIdentifier(metaDocPart, "", FieldType.STRING);
Assert.assertEquals("_s", identifier);
}
use of com.torodb.core.transaction.metainf.ImmutableMetaDocPart in project torodb by torodb.
the class IdentifierFactoryImplTest method fieldToIdentifierTest.
@Test
public void fieldToIdentifierTest() {
ImmutableMetaDocPart metaDocPart = new ImmutableMetaDocPart.Builder(createTableRef(), "docpart").build();
String identifier = identifierFactory.toFieldIdentifier(metaDocPart, "field", FieldType.STRING);
Assert.assertEquals("field_s", identifier);
}
use of com.torodb.core.transaction.metainf.ImmutableMetaDocPart in project torodb by torodb.
the class IdentifierFactoryImplTest method long128FieldToIdentifierTest.
@Test
public void long128FieldToIdentifierTest() {
ImmutableMetaDocPart metaDocPart = new ImmutableMetaDocPart.Builder(createTableRef(), "docpart").build();
String identifier = identifierFactory.toFieldIdentifier(metaDocPart, "field__long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long", FieldType.STRING);
Assert.assertEquals("field__long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_s", identifier);
}
Aggregations