Skip to content

Commit

Permalink
test(CustomQuerySearchEmployeeTest): select someone
Browse files Browse the repository at this point in the history
  • Loading branch information
Chamber6821 committed Apr 18, 2024
1 parent 4df8afb commit 1110777
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.example.jonebook.services.search;

import static org.mockito.Mockito.mock;

import com.example.jonebook.repositories.EmployeeRepository;
import com.example.jonebook.services.dto.EmployeeCriteria;
import java.util.HashSet;
import org.junit.jupiter.api.Test;

public class CustomQuerySearchEmployeeTest {
@Test
void selectAll() {
new CustomQuerySearchEmployee(mock(EmployeeRepository.class))
.search(EmployeeCriteria.builder()
.nameFragment("Petr")
.emailFragment("@")
.phonePrefix("123")
.internalPhonePrefix("321")
.departmentVariants(new HashSet<>() {
{
add("School");
}
})
.postsFragment(new HashSet<>() {
{
add("Teacher");
}
})
.build(),
null);
}
}

0 comments on commit 1110777

Please sign in to comment.