use of nl.knaw.huygens.timbuctoo.bulkupload.parsingstatemachine.ImportPropertyDescriptions in project timbuctoo by HuygensING.
the class TinkerpopSaverTest method addPropertyDescriptionsAddsThePropertyDescriptionsToTheCollection.
@Test
public void addPropertyDescriptionsAddsThePropertyDescriptionsToTheCollection() {
final TinkerpopSaver instance = new TinkerpopSaver(vres, graphWrapper, VRE_NAME, VRE_NAME, MAX_VERTICES_PER_TRANSACTION, VRE_NAME);
ImportPropertyDescriptions importPropertyDescriptions = new ImportPropertyDescriptions();
importPropertyDescriptions.getOrCreate(6).setPropertyName("first");
importPropertyDescriptions.getOrCreate(5).setPropertyName("second");
importPropertyDescriptions.getOrCreate(7).setPropertyName("third");
instance.addPropertyDescriptions(rawCollection, importPropertyDescriptions);
List<Vertex> properties = graphWrapper.getGraph().traversal().V(rawCollection.id()).out("hasProperty").toList();
assertThat(properties, hasSize(3));
assertThat(properties, containsInAnyOrder(likeVertex().withProperty("order", 0).withProperty("id", 6).withProperty("name", "first"), likeVertex().withProperty("order", 1).withProperty("id", 5).withProperty("name", "second"), likeVertex().withProperty("order", 2).withProperty("id", 7).withProperty("name", "third")));
}
Aggregations