|
23 | 23 | import org.junit.jupiter.api.Test;
|
24 | 24 | import org.neo4j.graphalgo.BaseProcTest;
|
25 | 25 | import org.neo4j.graphalgo.GdsCypher;
|
| 26 | +import org.neo4j.graphalgo.Orientation; |
| 27 | +import org.neo4j.graphalgo.PropertyMapping; |
| 28 | +import org.neo4j.graphalgo.PropertyMappings; |
| 29 | +import org.neo4j.graphalgo.RelationshipProjection; |
26 | 30 |
|
27 | 31 | import static org.hamcrest.MatcherAssert.assertThat;
|
28 | 32 | import static org.hamcrest.Matchers.greaterThan;
|
@@ -56,12 +60,18 @@ void exportGraph() {
|
56 | 60 | .withAnyLabel()
|
57 | 61 | .withNodeProperty("prop1")
|
58 | 62 | .withNodeProperty("prop2")
|
59 |
| - .withRelationshipType("REL1") |
60 |
| - .withRelationshipType("REL2") |
61 |
| - .withRelationshipType("REL3") |
62 |
| - .withRelationshipProperty("weight1") |
63 |
| - .withRelationshipProperty("weight2") |
64 |
| - .withRelationshipProperty("weight3") |
| 63 | + .withRelationshipType("REL1", RelationshipProjection |
| 64 | + .of("REL1", Orientation.NATURAL) |
| 65 | + .withProperties(PropertyMappings.of(PropertyMapping.of("weight1"))) |
| 66 | + ) |
| 67 | + .withRelationshipType("REL2", RelationshipProjection |
| 68 | + .of("REL2", Orientation.NATURAL) |
| 69 | + .withProperties(PropertyMappings.of(PropertyMapping.of("weight2"))) |
| 70 | + ) |
| 71 | + .withRelationshipType("REL3", RelationshipProjection |
| 72 | + .of("REL3", Orientation.NATURAL) |
| 73 | + .withProperties(PropertyMappings.of(PropertyMapping.of("weight3"))) |
| 74 | + ) |
65 | 75 | .graphCreate("test-graph")
|
66 | 76 | .yields());
|
67 | 77 |
|
|
0 commit comments