Skip to content

Commit 46a6b63

Browse files
test: Default formality is automatic and not always formal
1 parent c4221dc commit 46a6b63

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

deepl-java/src/test/java/com/deepl/api/TranslateTextTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,15 @@ void testFormality() throws DeepLException, InterruptedException {
149149
Assertions.assertTrue(result.getText().contains("dir"));
150150
}
151151

152+
// Default formality is automatic, so the output may be either formal or informal
152153
result =
153154
translator.translateText(
154155
"How are you?",
155156
null,
156157
"de",
157158
new TextTranslationOptions().setFormality(Formality.Default));
158159
if (!isMockServer) {
159-
Assertions.assertTrue(result.getText().contains("Ihnen"));
160+
Assertions.assertTrue(result.getText().contains("Ihnen") || result.getText().contains("dir"));
160161
}
161162

162163
result =

0 commit comments

Comments
 (0)