Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
theSoenke committed Sep 19, 2024
1 parent 7161c93 commit bd000ab
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@
import java.util.List;
import java.util.Map;


class FormatOptions {
public boolean unescape_tags = false;

public FormatOptions(boolean val) {
unescape_tags = val;
}
}

/**
* API tests for UploadsApi
*/
Expand Down Expand Up @@ -104,7 +113,7 @@ public void uploadCreateTest() throws ApiException, IOException, InterruptedExce
Boolean skipUnverification = null;
String fileEncoding = null;
Object localeMapping = null;
Object formatOptions = null;
Object formatOptions = new FormatOptions(true);
Boolean autotranslate = null;
Boolean markReviewed = null;
Boolean tagOnlyAffectedKeys = null;
Expand All @@ -115,7 +124,11 @@ public void uploadCreateTest() throws ApiException, IOException, InterruptedExce

RecordedRequest recordedRequest = mockBackend.takeRequest();
Assert.assertEquals("Request path", "//projects/projectId_example/uploads", recordedRequest.getPath());
Assert.assertTrue("Request payload", recordedRequest.getBody().readUtf8().contains("Content-Disposition: form-data; name=\"file\""));

Assert.assertEquals("Request method", "/test", recordedRequest.getRequestUrl().toString());
String requestBody = recordedRequest.getBody().readUtf8();
Assert.assertTrue("Request payload", requestBody.contains("Content-Disposition: form-data; name=\"file\""));
Assert.assertEquals("Request payload", "hello world", requestBody);
}

/**
Expand Down

0 comments on commit bd000ab

Please sign in to comment.