use of nl.knaw.huygens.timbuctoo.model.vre.Vre in project timbuctoo by HuygensING.
the class LoadSaveVreTest method saveCreatesAVertexForTheVre.
@Test
public void saveCreatesAVertexForTheVre() {
final Vre vre = new Vre("VreName");
final Vertex result = save(vre, initGraph()).get(0);
assertThat(result, likeVertex().withLabel(Vre.DATABASE_LABEL).withProperty(VRE_NAME_PROPERTY_NAME, "VreName"));
}
use of nl.knaw.huygens.timbuctoo.model.vre.Vre in project timbuctoo by HuygensING.
the class CollectionNameHelperTest method collectionNameDoesNotPrefixForTheAdminVre.
@Test
public void collectionNameDoesNotPrefixForTheAdminVre() {
Vre vre = VreStubs.withName(ADMIN_VRE);
String collectionName = CollectionNameHelper.collectionName(UNPREFIXED_ENTITY_NAME, vre);
assertThat(collectionName, not(startsWith(ADMIN_VRE)));
}
use of nl.knaw.huygens.timbuctoo.model.vre.Vre in project timbuctoo by HuygensING.
the class CollectionNameHelperTest method collectionNamePrefixesTheCollectionNameWithTheVreName.
@Test
public void collectionNamePrefixesTheCollectionNameWithTheVreName() {
Vre vre = VreStubs.withName(VRE_NAME);
String collectionName = CollectionNameHelper.collectionName(UNPREFIXED_ENTITY_NAME, vre);
assertThat(collectionName, allOf(startsWith(VRE_NAME), containsString(UNPREFIXED_ENTITY_NAME)));
}
use of nl.knaw.huygens.timbuctoo.model.vre.Vre in project timbuctoo by HuygensING.
the class CollectionNameHelperTest method entityTypeNamePrefixesWithTheVreName.
@Test
public void entityTypeNamePrefixesWithTheVreName() {
Vre vre = VreStubs.withName(VRE_NAME);
String entityTypeName = CollectionNameHelper.entityTypeName(UNPREFIXED_ENTITY_NAME, vre);
assertThat(entityTypeName, allOf(startsWith(VRE_NAME), endsWith(UNPREFIXED_ENTITY_NAME)));
}
use of nl.knaw.huygens.timbuctoo.model.vre.Vre in project timbuctoo by HuygensING.
the class CollectionNameHelperTest method entityTypeNameDoesNotPrefixForTheAdminVre.
@Test
public void entityTypeNameDoesNotPrefixForTheAdminVre() {
Vre vre = VreStubs.withName(ADMIN_VRE);
String entityTypeName = CollectionNameHelper.entityTypeName(UNPREFIXED_ENTITY_NAME, vre);
assertThat(entityTypeName, not(startsWith(ADMIN_VRE)));
}
Aggregations