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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top