use of org.neo4j.shell.impl.BashVariableInterpreter.Replacer in project neo4j by neo4j.
the class BashVariableInterpreterTest method customInterpreter.
@Test
public void customInterpreter() throws Exception {
// GIVEN
interpreter.addReplacer("test", new Replacer() {
@Override
public String getReplacement(ShellServer server, Session session) throws ShellException {
return "Hello";
}
});
// WHEN
String interpreted = interpreter.interpret("\\test world", server, session);
// THEN
assertEquals("Hello world", interpreted);
}
Aggregations