@Test void listScriptsShouldReturnEmpty() { assertThat(sieveDAO.listScripts(USERNAME).toIterable()).isEmpty(); }
public Flux<ScriptSummary> listScripts(Username username) { return cassandraAsyncExecutor.executeRows( selectScriptsStatement.bind() .setString(USER_NAME, username.asString())) .map(row -> new ScriptSummary( new ScriptName(row.getString(SCRIPT_NAME)), row.getBool(IS_ACTIVE))); }
CassandraSieveDAO { public Flux<ScriptSummary> listScripts(Username username) { return cassandraAsyncExecutor.executeRows( selectScriptsStatement.bind() .setString(USER_NAME, username.asString())) .map(row -> new ScriptSummary( new ScriptName(row.getString(SCRIPT_NAME)), row.getBool(IS_ACTIVE))); } }
CassandraSieveDAO { public Flux<ScriptSummary> listScripts(Username username) { return cassandraAsyncExecutor.executeRows( selectScriptsStatement.bind() .setString(USER_NAME, username.asString())) .map(row -> new ScriptSummary( new ScriptName(row.getString(SCRIPT_NAME)), row.getBool(IS_ACTIVE))); } @Inject  CassandraSieveDAO(Session session); }
CassandraSieveDAO { public Flux<ScriptSummary> listScripts(Username username) { return cassandraAsyncExecutor.executeRows( selectScriptsStatement.bind() .setString(USER_NAME, username.asString())) .map(row -> new ScriptSummary( new ScriptName(row.getString(SCRIPT_NAME)), row.getBool(IS_ACTIVE))); } @Inject  CassandraSieveDAO(Session session); Mono<Void> insertScript(Username username, Script script); Flux<ScriptSummary> listScripts(Username username); Mono<Boolean> updateScriptActivation(Username username, ScriptName scriptName, boolean active); Mono<Script> getScript(Username username, ScriptName name); Mono<Boolean> deleteScriptInCassandra(Username username, ScriptName name); }
CassandraSieveDAO { public Flux<ScriptSummary> listScripts(Username username) { return cassandraAsyncExecutor.executeRows( selectScriptsStatement.bind() .setString(USER_NAME, username.asString())) .map(row -> new ScriptSummary( new ScriptName(row.getString(SCRIPT_NAME)), row.getBool(IS_ACTIVE))); } @Inject  CassandraSieveDAO(Session session); Mono<Void> insertScript(Username username, Script script); Flux<ScriptSummary> listScripts(Username username); Mono<Boolean> updateScriptActivation(Username username, ScriptName scriptName, boolean active); Mono<Script> getScript(Username username, ScriptName name); Mono<Boolean> deleteScriptInCassandra(Username username, ScriptName name);  }