Skip to content

Commit

Permalink
test(CriteriaSearchEmployee): search something
Browse files Browse the repository at this point in the history
  • Loading branch information
Chamber6821 committed Apr 17, 2024
1 parent 44cffed commit 215b1b6
Showing 1 changed file with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.example.jonebook.services.search;

import static org.mockito.Mockito.*;

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

public class CriteriaSearchEmployeeTest {
@Test
void searchAll() {
new CriteriaSearchEmployee(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 215b1b6

Please sign in to comment.