Skip to content

Commit

Permalink
moved tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jendib committed May 16, 2022
1 parent 1f7c0af commit 98aa333
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import com.google.common.io.Resources;
import com.sismics.docs.core.util.DirectoryUtil;
import com.sismics.util.filter.TokenBasedSecurityFilter;
import com.sismics.util.mime.MimeType;
import com.sismics.util.mime.MimeTypeUtil;
import org.glassfish.jersey.media.multipart.FormDataMultiPart;
import org.glassfish.jersey.media.multipart.MultiPartFeature;
import org.glassfish.jersey.media.multipart.file.StreamDataBodyPart;
Expand Down Expand Up @@ -472,7 +470,6 @@ public void testOdtExtraction() throws Exception {
InputStream is = (InputStream) response.getEntity();
byte[] fileBytes = ByteStreams.toByteArray(is);
Assert.assertTrue(fileBytes.length > 0); // Images rendered from PDF differ in size from OS to OS due to font issues
Assert.assertEquals(MimeType.IMAGE_JPEG, MimeTypeUtil.guessMimeType(fileBytes, null));

// Export a document in PDF format
response = target().path("/document/" + document1Id + "/pdf")
Expand Down Expand Up @@ -523,7 +520,6 @@ public void testDocxExtraction() throws Exception {
InputStream is = (InputStream) response.getEntity();
byte[] fileBytes = ByteStreams.toByteArray(is);
Assert.assertTrue(fileBytes.length > 0); // Images rendered from PDF differ in size from OS to OS due to font issues
Assert.assertEquals(MimeType.IMAGE_JPEG, MimeTypeUtil.guessMimeType(fileBytes, null));

// Export a document in PDF format
response = target().path("/document/" + document1Id + "/pdf")
Expand Down Expand Up @@ -574,7 +570,6 @@ public void testPdfExtraction() throws Exception {
InputStream is = (InputStream) response.getEntity();
byte[] fileBytes = ByteStreams.toByteArray(is);
Assert.assertTrue(fileBytes.length > 0); // Images rendered from PDF differ in size from OS to OS due to font issues
Assert.assertEquals(MimeType.IMAGE_JPEG, MimeTypeUtil.guessMimeType(fileBytes, null));

// Export a document in PDF format
response = target().path("/document/" + document1Id + "/pdf")
Expand Down Expand Up @@ -625,7 +620,6 @@ public void testPlainTextExtraction() throws Exception {
InputStream is = (InputStream) response.getEntity();
byte[] fileBytes = ByteStreams.toByteArray(is);
Assert.assertTrue(fileBytes.length > 0); // Images rendered from PDF differ in size from OS to OS due to font issues
Assert.assertEquals(MimeType.IMAGE_JPEG, MimeTypeUtil.guessMimeType(fileBytes, null));

// Get the content data
response = target().path("/file/" + file1Id + "/data")
Expand Down Expand Up @@ -686,7 +680,6 @@ public void testVideoExtraction() throws Exception {
InputStream is = (InputStream) response.getEntity();
byte[] fileBytes = ByteStreams.toByteArray(is);
Assert.assertTrue(fileBytes.length > 0); // Images rendered from PDF differ in size from OS to OS due to font issues
Assert.assertEquals(MimeType.IMAGE_JPEG, MimeTypeUtil.guessMimeType(fileBytes, null));

// Export a document in PDF format
response = target().path("/document/" + document1Id + "/pdf")
Expand Down Expand Up @@ -737,7 +730,6 @@ public void testPptxExtraction() throws Exception {
InputStream is = (InputStream) response.getEntity();
byte[] fileBytes = ByteStreams.toByteArray(is);
Assert.assertTrue(fileBytes.length > 0); // Images rendered from PDF differ in size from OS to OS due to font issues
Assert.assertEquals(MimeType.IMAGE_JPEG, MimeTypeUtil.guessMimeType(fileBytes, null));

// Export a document in PDF format
response = target().path("/document/" + document1Id + "/pdf")
Expand Down

0 comments on commit 98aa333

Please sign in to comment.