@Test void getScriptShouldReturnEmptyByDefault() { assertThat(sieveDAO.getScript(USERNAME, SCRIPT_NAME).blockOptional()) .isEmpty(); }
public Mono<Script> getScript(Username username, ScriptName name) { return getScriptRow(username, name).map(row -> Script.builder() .content(row.getString(SCRIPT_CONTENT)) .isActive(row.getBool(IS_ACTIVE)) .name(name) .size(row.getLong(SIZE)) .build()); }
CassandraSieveDAO { public Mono<Script> getScript(Username username, ScriptName name) { return getScriptRow(username, name).map(row -> Script.builder() .content(row.getString(SCRIPT_CONTENT)) .isActive(row.getBool(IS_ACTIVE)) .name(name) .size(row.getLong(SIZE)) .build()); } }
CassandraSieveDAO { public Mono<Script> getScript(Username username, ScriptName name) { return getScriptRow(username, name).map(row -> Script.builder() .content(row.getString(SCRIPT_CONTENT)) .isActive(row.getBool(IS_ACTIVE)) .name(name) .size(row.getLong(SIZE)) .build()); } @Inject  CassandraSieveDAO(Session session); }
CassandraSieveDAO { public Mono<Script> getScript(Username username, ScriptName name) { return getScriptRow(username, name).map(row -> Script.builder() .content(row.getString(SCRIPT_CONTENT)) .isActive(row.getBool(IS_ACTIVE)) .name(name) .size(row.getLong(SIZE)) .build()); } @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 Mono<Script> getScript(Username username, ScriptName name) { return getScriptRow(username, name).map(row -> Script.builder() .content(row.getString(SCRIPT_CONTENT)) .isActive(row.getBool(IS_ACTIVE)) .name(name) .size(row.getLong(SIZE)) .build()); } @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);  }