@Test public void setParamShouldAddParam() throws EvaluationException, CommandException { Value value = mock(Value.class); Record recordMock = mock(Record.class); BoltResult boltResult = mock(ListBoltResult.class); when(mockedBoltStateHandler.runCypher(anyString(), anyMap())).thenReturn(Optional.of(boltResult)); when(boltResult.getRecords()).thenReturn(asList(recordMock)); when(recordMock.get("bob")).thenReturn(value); when(value.asObject()).thenReturn("99"); assertTrue(offlineTestShell.getParameterMap().allParameterValues().isEmpty()); Object result = offlineTestShell.getParameterMap().setParameter("`bob`", "99"); assertEquals(99L, result); assertEquals(99L, offlineTestShell.getParameterMap().allParameterValues().get("bob")); }
public ParameterMap getParameterMap() { return parameterMap; }
CypherShell implements StatementExecuter, Connector, TransactionHandler, DatabaseManager { public ParameterMap getParameterMap() { return parameterMap; } }
CypherShell implements StatementExecuter, Connector, TransactionHandler, DatabaseManager { public ParameterMap getParameterMap() { return parameterMap; } CypherShell(@Nonnull LinePrinter linePrinter,
                       @Nonnull PrettyConfig prettyConfig,
                       boolean isInteractive,
                       ParameterMap parameterMap); protected  CypherShell(@Nonnull LinePrinter linePrinter,
                          @Nonnull BoltStateHandler boltStateHandler,
                          @Nonnull PrettyPrinter prettyPrinter,
                          ParameterMap parameterMap); }
CypherShell implements StatementExecuter, Connector, TransactionHandler, DatabaseManager { public ParameterMap getParameterMap() { return parameterMap; } CypherShell(@Nonnull LinePrinter linePrinter,
                       @Nonnull PrettyConfig prettyConfig,
                       boolean isInteractive,
                       ParameterMap parameterMap); protected  CypherShell(@Nonnull LinePrinter linePrinter,
                          @Nonnull BoltStateHandler boltStateHandler,
                          @Nonnull PrettyPrinter prettyPrinter,
                          ParameterMap parameterMap); @Override void execute(@Nonnull final String cmdString); @Override String lastNeo4jErrorCode(); @Override boolean isConnected(); @Override void connect( @Nonnull ConnectionConfig connectionConfig,
            ThrowingAction<CommandException> command); @Nonnull @Override String getServerVersion(); @Override void beginTransaction(); @Override void commitTransaction(); @Override void rollbackTransaction(); @Override boolean isTransactionOpen(); void setCommandHelper(@Nonnull CommandHelper commandHelper); @Override void reset(); @Override void setActiveDatabase(String databaseName); @Override String getActiveDatabaseAsSetByUser(); @Override String getActualDatabaseAsReportedByServer(); ParameterMap getParameterMap(); void changePassword(@Nonnull ConnectionConfig connectionConfig); void disconnect(); }
CypherShell implements StatementExecuter, Connector, TransactionHandler, DatabaseManager { public ParameterMap getParameterMap() { return parameterMap; } CypherShell(@Nonnull LinePrinter linePrinter,
                       @Nonnull PrettyConfig prettyConfig,
                       boolean isInteractive,
                       ParameterMap parameterMap); protected  CypherShell(@Nonnull LinePrinter linePrinter,
                          @Nonnull BoltStateHandler boltStateHandler,
                          @Nonnull PrettyPrinter prettyPrinter,
                          ParameterMap parameterMap); @Override void execute(@Nonnull final String cmdString); @Override String lastNeo4jErrorCode(); @Override boolean isConnected(); @Override void connect( @Nonnull ConnectionConfig connectionConfig,
            ThrowingAction<CommandException> command); @Nonnull @Override String getServerVersion(); @Override void beginTransaction(); @Override void commitTransaction(); @Override void rollbackTransaction(); @Override boolean isTransactionOpen(); void setCommandHelper(@Nonnull CommandHelper commandHelper); @Override void reset(); @Override void setActiveDatabase(String databaseName); @Override String getActiveDatabaseAsSetByUser(); @Override String getActualDatabaseAsReportedByServer(); ParameterMap getParameterMap(); void changePassword(@Nonnull ConnectionConfig connectionConfig); void disconnect();  }