Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #230 from sherfert/4.0-version-assume
Browse files Browse the repository at this point in the history
Fix version assume!
  • Loading branch information
sherfert authored Jun 26, 2020
2 parents 437244d + 5dcf6fd commit 201f35e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,5 @@ ext {
mockitoVersion = '1.9.5'
systemRulesVersion = '1.19.0'
commonsIoVersion = '2.6'
hamcrestVersion = '2.0.0.0'
}
1 change: 1 addition & 0 deletions cypher-shell/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,6 @@ dependencies {
testCompile "junit:junit:$junitVersion"
testCompile "org.mockito:mockito-core:$mockitoVersion"
testCompile "com.github.stefanbirkner:system-rules:$systemRulesVersion"
testCompile "org.hamcrest:java-hamcrest:$hamcrestVersion"
testCompileOnly "com.google.code.findbugs:annotations:$findbugsVersion"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@

import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.junit.Assume.assumeThat;
import static org.junit.Assert.assertEquals;
import static org.neo4j.shell.prettyprint.OutputFormatter.NEWLINE;
import static org.neo4j.shell.util.Versions.version;

public class CypherShellPlainIntegrationTest extends CypherShellIntegrationTest {
@Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeThat;
import static org.junit.Assume.assumeTrue;
import static org.neo4j.shell.util.Versions.majorVersion;
import static org.neo4j.shell.util.Versions.minorVersion;
import static org.neo4j.shell.util.Versions.version;

public class CypherShellVerboseIntegrationTest extends CypherShellIntegrationTest {
@Rule
Expand Down Expand Up @@ -193,7 +195,7 @@ public void paramsAndListVariablesWithSpecialCharacters() throws EvaluationExcep
public void cypherWithOrder() throws CommandException {
// given
String serverVersion = shell.getServerVersion();
assumeTrue((minorVersion(serverVersion) == 6 && majorVersion(serverVersion) == 3) || majorVersion(serverVersion) > 3);
assumeThat( version(serverVersion), greaterThanOrEqualTo(version("3.6")));

// Make sure we are creating a new NEW index
try {
Expand All @@ -218,7 +220,7 @@ public void cypherWithOrder() throws CommandException {
public void cypherWithQueryDetails() throws CommandException {
// given
String serverVersion = shell.getServerVersion();
assumeTrue((minorVersion(serverVersion) > 0 && majorVersion(serverVersion) == 4) || majorVersion(serverVersion) > 4);
assumeThat( version(serverVersion), greaterThanOrEqualTo(version("4.1")));

//when
shell.execute("EXPLAIN MATCH (n) with n.age AS age RETURN age");
Expand All @@ -234,7 +236,7 @@ public void cypherWithQueryDetails() throws CommandException {
public void cypherWithoutQueryDetails() throws CommandException {
// given
String serverVersion = shell.getServerVersion();
assumeTrue((minorVersion(serverVersion) == 0 && majorVersion(serverVersion) == 4) || majorVersion(serverVersion) < 4);
assumeThat( version(serverVersion), not(greaterThanOrEqualTo(version("4.1"))));

//when
shell.execute("EXPLAIN MATCH (n) with n.age AS age RETURN age");
Expand Down

0 comments on commit 201f35e

Please sign in to comment.