Skip to content

Commit

Permalink
Google Java Format
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Feb 1, 2024
1 parent bf5f4e1 commit 9f4965d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@
import io.github.brenoepics.at4j.core.thread.ThreadPool;
import io.github.brenoepics.at4j.core.thread.ThreadPoolImpl;
import io.github.brenoepics.at4j.data.DetectedLanguage;
import io.github.brenoepics.at4j.data.Translation;
import io.github.brenoepics.at4j.data.request.AvailableLanguagesParams;
import io.github.brenoepics.at4j.data.request.DetectLanguageParams;
import io.github.brenoepics.at4j.data.request.TranslateParams;
import io.github.brenoepics.at4j.data.response.TranslationResponse;
import io.github.brenoepics.at4j.util.rest.RestEndpoint;
import io.github.brenoepics.at4j.util.rest.RestMethod;
import io.github.brenoepics.at4j.util.rest.RestRequest;
import io.github.brenoepics.at4j.util.rest.RestRequestResult;

import java.net.http.HttpClient;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import org.junit.jupiter.api.Test;
import org.mockito.Mock;

import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
Expand Down Expand Up @@ -41,7 +40,8 @@ void returnsEmptyOnInvalidInput() {
}
});

CompletableFuture<Optional<List<TranslationResponse>>> response = azureApi.translate(translateParams);
CompletableFuture<Optional<List<TranslationResponse>>> response =
azureApi.translate(translateParams);

assertFalse(response.join().isPresent());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class TranslationResponseTest {
void createsTranslationResponseWithDetectedLanguageAndTranslations() {
DetectedLanguage detectedLanguage = new DetectedLanguage("en", 1.0f);
Translation translation = new Translation("pt", "Olá, mundo!");
TranslationResponse response = new TranslationResponse(translation.getText(), detectedLanguage, List.of(translation));
TranslationResponse response =
new TranslationResponse(translation.getText(), detectedLanguage, List.of(translation));

assertEquals(detectedLanguage, response.getDetectedLanguage());
assertEquals(1, response.getTranslations().size());
Expand All @@ -26,7 +27,8 @@ void createsTranslationResponseWithDetectedLanguageAndTranslations() {
@Test
void createsTranslationResponseWithTranslationsOnly() {
Translation translation = new Translation("pt", "Olá, mundo!");
TranslationResponse response = new TranslationResponse(translation.getText(), List.of(translation));
TranslationResponse response =
new TranslationResponse(translation.getText(), List.of(translation));

assertNull(response.getDetectedLanguage());
assertEquals(1, response.getTranslations().size());
Expand Down

0 comments on commit 9f4965d

Please sign in to comment.