Skip to content

Commit

Permalink
chore: changed handle NoSQLRepository
Browse files Browse the repository at this point in the history
Signed-off-by: Maximillian Arruda <dearrudam@gmail.com>
  • Loading branch information
dearrudam committed Feb 28, 2024
1 parent e6fc07f commit fe38d39
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@

import jakarta.data.page.Page;
import jakarta.data.page.PageRequest;
import jakarta.data.repository.BasicRepository;
import jakarta.data.repository.Delete;
import jakarta.data.repository.Insert;
import jakarta.data.repository.Param;
import jakarta.data.repository.Query;
import jakarta.data.repository.Repository;
import jakarta.data.repository.Save;
import jakarta.data.repository.Update;
import org.eclipse.jnosql.mapping.NoSQLRepository;

import java.util.List;

@Repository
public interface PersonRepository extends BasicRepository<Person, Long> {
public interface PersonRepository extends NoSQLRepository<Person, Long> {

List<Person> findByName(String name);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ void shouldDeleteEntity() {
verify(template,times(1)).delete(eq(Person.class),eq(person.getId()));
}

@Test
void shouldDeleteAllEntities() {
personRepository.deleteAll();

verify(template, times(1)).deleteAll(eq(Person.class));
}

@Test
void shouldUpdate(){
this.personRepository.update(new Person());
Expand Down

0 comments on commit fe38d39

Please sign in to comment.