[BAEL-6318] fix test
This commit is contained in:
parent
b61c2af4ac
commit
b6966054b4
|
@ -18,7 +18,7 @@ public class EmployeeClient {
|
|||
}
|
||||
|
||||
public Page<EmployeeDto> getEmployeeDataFromExternalAPI(Pageable pageable) {
|
||||
String url = "http://localhost:8080/external-service/employee";
|
||||
String url = "http://localhost:8080/employee";
|
||||
|
||||
UriComponentsBuilder uriBuilder = UriComponentsBuilder.fromUriString(url)
|
||||
.queryParam("page", pageable.getPageNumber())
|
||||
|
|
|
@ -7,6 +7,8 @@ import static org.mockito.Mockito.mock;
|
|||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.Mockito;
|
||||
import org.springframework.core.ParameterizedTypeReference;
|
||||
|
@ -59,7 +61,8 @@ public class EmployeeClientUnitTest {
|
|||
isNull(),
|
||||
eq(responseType)
|
||||
);
|
||||
assertEquals(1, result.getNumberOfElements());
|
||||
assertEquals(mockedResponse, result.getContent().get(0));
|
||||
assertEquals(3, result.getNumberOfElements());
|
||||
List<EmployeeDto> content = result.getContent();
|
||||
assertEquals(mockedResponse.getContent(), content);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue