Skip to content

Commit

Permalink
fest: create database manager test
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
  • Loading branch information
otaviojava committed Mar 30, 2024
1 parent e4baf61 commit 516d5df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Expand Up @@ -269,6 +269,10 @@ default Optional<CommunicationEntity> singleResult(SelectQuery query) {
default CursoredPage<CommunicationEntity> selectCursor(SelectQuery query, PageRequest<?> pageRequest){
Objects.requireNonNull(query, "query is required");
Objects.requireNonNull(pageRequest, "pageRequest is required");
if(query.sorts().isEmpty()){
throw new IllegalArgumentException("To execute a cursor pagination, it is necessary to define at least one sort field." +
query);
}
CursorExecutor executor = CursorExecutor.of(pageRequest.mode());
return executor.cursor(query, pageRequest, this);
}
Expand Down
@@ -0,0 +1,4 @@
import static org.junit.jupiter.api.Assertions.*;
class DatabaseManagerTest {

}

0 comments on commit 516d5df

Please sign in to comment.