Skip to content

Commit

Permalink
update to undirected proc references in test
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaderberg committed Oct 3, 2023
1 parent d4273da commit 46efcd8
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.neo4j.gds.BaseProcTest;
import org.neo4j.gds.GdsCypher;
import org.neo4j.gds.Orientation;
Expand Down Expand Up @@ -76,9 +78,10 @@ void setup() throws Exception {
);
}

@Test
void convertToUndirected() {
String query = "CALL gds.graph.relationships.toUndirected('graph', {relationshipType: 'REL', mutateRelationshipType: 'REL2'})";
@ParameterizedTest
@ValueSource(strings = {"gds.graph.relationships.toUndirected", "gds.beta.graph.relationships.toUndirected"})
void convertToUndirected(String procedureName) {
String query = "CALL " + procedureName + "('graph', {relationshipType: 'REL', mutateRelationshipType: 'REL2'})";

assertCypherResult(query, List.of(Map.of("inputRelationships", 3L,
"relationshipsWritten", 6L,
Expand Down Expand Up @@ -120,7 +123,7 @@ void shouldAllowStarIfStarWasProjected() {
);

assertCypherResult(
"CALL gds.beta.graph.relationships.toUndirected('star_graph', {relationshipType: '*', mutateRelationshipType: 'UNDIRECTED'}) YIELD relationshipsWritten",
"CALL gds.graph.relationships.toUndirected('star_graph', {relationshipType: '*', mutateRelationshipType: 'UNDIRECTED'}) YIELD relationshipsWritten",
List.of(Map.of("relationshipsWritten", 6L))
);
}
Expand Down

0 comments on commit 46efcd8

Please sign in to comment.