Skip to content

Commit

Permalink
(#45) Change DocumentTest to test from binary (pdf) file instead of text
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriciofx committed Dec 13, 2023
1 parent 7f84070 commit ecd51b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
import com.github.fabriciofx.cactoos.pdf.resource.FontFamily;
import com.github.fabriciofx.cactoos.pdf.resource.Resources;
import java.io.File;
import java.io.InputStream;
import java.nio.file.Files;
import org.cactoos.bytes.BytesOf;
import org.cactoos.io.ResourceOf;
import org.cactoos.map.MapEntry;
import org.cactoos.map.MapOf;
import org.cactoos.text.Joined;
Expand Down Expand Up @@ -71,11 +74,7 @@ void buildDocument() throws Exception {
);
final Count count = new ObjectCount();
final Date date = new Date(2023, 12, 11, 20, 11, 32, "Etc/GMT-3");
final String filename = new Joined(
"/",
"src/test/resources/com/github/fabriciofx/cactoos/pdf",
"HelloWorld.pdf"
).asString();
final String filename = "src/test/resources/document/HelloWorld.pdf";
final byte[] expected = Files.readAllBytes(
new File(filename).toPath()
);
Expand Down
File renamed without changes.

0 comments on commit ecd51b0

Please sign in to comment.