-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…#2700) * Fixes #558: Check for neo4j version being compatible with neo version * doc addition - changed neo4j version getting * added test - changed version handling * edit comment
- Loading branch information
Showing
3 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
core/src/test/java/apoc/cypher/CypherIsVersionDifferentTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package apoc.cypher; | ||
|
||
import org.junit.Test; | ||
|
||
import java.util.List; | ||
|
||
import static org.junit.Assert.assertFalse; | ||
import static org.junit.Assert.assertTrue; | ||
|
||
public class CypherIsVersionDifferentTest { | ||
|
||
@Test | ||
public void shouldReturnFalseOnlyWithCompatibleVersion() { | ||
assertTrue(CypherInitializer.isVersionDifferent(List.of("3.5"), "4.4.0.2")); | ||
assertTrue(CypherInitializer.isVersionDifferent(List.of("5_0"), "4.4.0.2")); | ||
|
||
// we expect that APOC versioning is always consistent to Neo4j versioning | ||
assertFalse(CypherInitializer.isVersionDifferent(List.of("5_0"), "5_0_0_1")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters