Skip to content

Commit

Permalink
[conluz-70] Adapted call to new arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorKhan committed Apr 17, 2024
1 parent 4a3e029 commit 7326c5a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
import org.lucoenergia.conluz.infrastructure.shared.BaseIntegrationTest;
import org.lucoenergia.conluz.infrastructure.shared.time.TimeConfiguration;
import org.lucoenergia.conluz.infrastructure.shared.web.rest.ConluzRestClientBuilder;
import org.mockito.ArgumentMatchers;
import org.mockito.Mockito;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.time.Duration;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
Expand All @@ -25,6 +27,7 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.when;

class GetPriceRepositoryRestTest extends BaseIntegrationTest {
Expand Down Expand Up @@ -56,7 +59,7 @@ void syncDailyPrices_successfulResponseWithNumberOne() throws IOException {

String bodyString = new String(Files.readAllBytes(Paths.get(OMIE_PRICES)));

when(conluzRestClientBuilder.build()).thenReturn(okHttpClient);
when(conluzRestClientBuilder.build(eq(false), ArgumentMatchers.any(Duration.class))).thenReturn(okHttpClient);
when(okHttpClient.newCall(argThat(argument ->
argument != null &&
argument.url() != null &&
Expand Down

0 comments on commit 7326c5a

Please sign in to comment.