Question

I have a project using commons-email ( http://search.maven.org/#artifactdetails|org.apache.commons|commons-email|1.2|jar ) through maven. I would like to use the email Mocks class ( http://commons.apache.org/email/testapidocs/org/apache/commons/mail/mocks/MockHtmlEmailConcrete.html ) to write some unit tests. However the org.apache.commons.mail.mocks package never gets included through the maven dependency. Where can I find this package?

Was it helpful?

Solution

This class is not part of the official Apache Commons Mail API, it seems to be used internally for testing commons-email. That's why it is not part of the resulting jar and it is not available to you.

You probably need to copy over that code to your project or find some other email-mocking functionality, e.g. we are using dumbster n our tests.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top