简体   繁体   中英

configuring mock emails with commons-email

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, eg we are using dumbster n our tests.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM