use of com.torodb.core.transaction.metainf.ImmutableMetaDatabase in project torodb by torodb.
the class IdentifierFactoryImplTest method unallowedCollectionDocPartRootToIdentifierTest.
@Test
public void unallowedCollectionDocPartRootToIdentifierTest() {
ImmutableMetaDatabase metaDatabase = new ImmutableMetaDatabase.Builder("database", "database").build();
String identifier = identifierFactory.toDocPartIdentifier(metaDatabase, "unallowed_table", createTableRef());
Assert.assertEquals("_unallowed_table", identifier);
}
use of com.torodb.core.transaction.metainf.ImmutableMetaDatabase in project torodb by torodb.
the class IdentifierFactoryImplTest method docPartArrayChildToIdentifierTest.
@Test
public void docPartArrayChildToIdentifierTest() {
ImmutableMetaDatabase metaDatabase = new ImmutableMetaDatabase.Builder("database", "database").build();
String identifier = identifierFactory.toDocPartIdentifier(metaDatabase, "collecti", createTableRef("array"));
Assert.assertEquals("collecti_array", identifier);
}
use of com.torodb.core.transaction.metainf.ImmutableMetaDatabase in project torodb by torodb.
the class IdentifierFactoryImplTest method long128DocPartToIdentifierTest.
@Test
public void long128DocPartToIdentifierTest() {
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"));
Assert.assertEquals("collecti_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long", identifier);
}
use of com.torodb.core.transaction.metainf.ImmutableMetaDatabase in project torodb by torodb.
the class IdentifierFactoryImplTest method docPartObjectArrayInArrayObjectToIdentifierTest.
@Test
public void docPartObjectArrayInArrayObjectToIdentifierTest() {
ImmutableMetaDatabase metaDatabase = new ImmutableMetaDatabase.Builder("database", "database").build();
String identifier = identifierFactory.toDocPartIdentifier(metaDatabase, "collecti", createTableRef("object", "array", "2", "object"));
Assert.assertEquals("collecti_object_array$2_object", identifier);
}
use of com.torodb.core.transaction.metainf.ImmutableMetaDatabase in project torodb by torodb.
the class IdentifierFactoryImplTest method docPartRootToIdentifierTest.
@Test
public void docPartRootToIdentifierTest() {
ImmutableMetaDatabase metaDatabase = new ImmutableMetaDatabase.Builder("database", "database").build();
String identifier = identifierFactory.toDocPartIdentifier(metaDatabase, "collecti", createTableRef());
Assert.assertEquals("collecti", identifier);
}
Aggregations