use of org.neo4j.shell.parser.ShellStatementParser in project neo4j by neo4j.
the class InteractiveShellRunnerTest method multilineEndsOnSemicolonOnNewLine.
@Test
public void multilineEndsOnSemicolonOnNewLine() throws Exception {
// given
String inputString = "\nCREATE (n:Person) RETURN n\n;\n";
InputStream inputStream = new ByteArrayInputStream(inputString.getBytes());
InteractiveShellRunner runner = new InteractiveShellRunner(cmdExecuter, txHandler, databaseManager, logger, new ShellStatementParser(), inputStream, historyFile, userMessagesHandler, connectionConfig);
// when
runner.runUntilEnd();
// then
verify(cmdExecuter).execute("CREATE (n:Person) RETURN n\n;");
}
use of org.neo4j.shell.parser.ShellStatementParser 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();
}
Aggregations