Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Unit test with PDF files

Avatar

Level 3

Hi everyone,

I’ve created a custom component populated it with some data and I’m having some struggle testing it, any help would be appreciated heres the link to the gist containing all the files(java and json): https://gist.github.com/odaBio/f76d3b15500581ca3fa08143fd9fead1

 

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Community Advisor and Adobe Champion

When trying to use resources such as an PDF in your Java Unit tests, you should place the files in the resourced folder, https://www.baeldung.com/junit-src-test-resources-directory-path

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor and Adobe Champion

When trying to use resources such as an PDF in your Java Unit tests, you should place the files in the resourced folder, https://www.baeldung.com/junit-src-test-resources-directory-path