use of org.neo4j.shell.prettyprint.PrettyConfig in project neo4j by neo4j.
the class CypherShellProtocolIntegrationTest method shouldConnectWithNeo4jProtocol.
@Test
public void shouldConnectWithNeo4jProtocol() throws Exception {
CypherShell shell = new CypherShell(new StringLinePrinter(), new PrettyConfig(Format.PLAIN, true, 1000), false, new ShellParameterMap());
// This should work even on older databases without the neo4j protocol, by falling back to bolt
shell.connect(new ConnectionConfig("neo4j", "localhost", 7687, "neo4j", "neo", Encryption.DEFAULT, ABSENT_DB_NAME));
assertTrue(shell.isConnected());
}
use of org.neo4j.shell.prettyprint.PrettyConfig in project neo4j by neo4j.
the class CypherShellVerboseIntegrationTest method setUp.
@Before
public void setUp() throws Exception {
linePrinter.clear();
shell = new CypherShell(linePrinter, new PrettyConfig(Format.VERBOSE, true, 1000), false, new ShellParameterMap());
connect("neo");
}
use of org.neo4j.shell.prettyprint.PrettyConfig 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.prettyprint.PrettyConfig 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