Search in sources :

Example 11 with ClientException

use of org.neo4j.driver.exceptions.ClientException in project neo4j by neo4j.

the class NonInteractiveShellRunnerTest method setup.

@Before
public void setup() throws CommandException {
    statementParser = new ShellStatementParser();
    badLineError = new ClientException("Found a bad line");
    doThrow(badLineError).when(cmdExecuter).execute(contains("bad"));
    doReturn(System.out).when(logger).getOutputStream();
}
Also used : ShellStatementParser(org.neo4j.shell.parser.ShellStatementParser) ClientException(org.neo4j.driver.exceptions.ClientException) Before(org.junit.Before)

Aggregations

ClientException (org.neo4j.driver.exceptions.ClientException)11 Test (org.junit.Test)6 Result (org.neo4j.driver.Result)3 Before (org.junit.Before)2 Driver (org.neo4j.driver.Driver)2 Session (org.neo4j.driver.Session)2 ServiceUnavailableException (org.neo4j.driver.exceptions.ServiceUnavailableException)2 ConnectionConfig (org.neo4j.shell.ConnectionConfig)2 ShellStatementParser (org.neo4j.shell.parser.ShellStatementParser)2 FakeDriver (org.neo4j.shell.test.bolt.FakeDriver)2 FakeSession (org.neo4j.shell.test.bolt.FakeSession)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 PrintStream (java.io.PrintStream)1 Nonnull (javax.annotation.Nonnull)1 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)1 Test (org.junit.jupiter.api.Test)1 DiscoveryException (org.neo4j.driver.exceptions.DiscoveryException)1 SessionExpiredException (org.neo4j.driver.exceptions.SessionExpiredException)1 ResultSummary (org.neo4j.driver.summary.ResultSummary)1 CypherShell (org.neo4j.shell.CypherShell)1