use of org.neo4j.shell.ShellParameterMap in project neo4j by neo4j.
the class CypherShellPlainIntegrationTest method setUp.
@Before
public void setUp() throws Exception {
linePrinter.clear();
shell = new CypherShell(linePrinter, new PrettyConfig(Format.PLAIN, true, 1000), false, new ShellParameterMap());
connect("neo");
}
use of org.neo4j.shell.ShellParameterMap in project neo4j by neo4j.
the class CypherShellPlainIntegrationTest method shouldUseParamFromCLIArgs.
@Test
public void shouldUseParamFromCLIArgs() throws EvaluationException, CommandException {
// given a CLI arg
ShellParameterMap parameterMap = new ShellParameterMap();
parameterMap.setParameter("foo", "'bar'");
shell = new CypherShell(linePrinter, new PrettyConfig(Format.PLAIN, true, 1000), false, parameterMap);
connect("neo");
// when
shell.execute("CYPHER RETURN $foo");
// then
String actual = linePrinter.output();
assertThat(actual, containsString("$foo"));
assertThat(actual, containsString("bar"));
}
Aggregations