You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Circumstances
The EmailServiceTest class sends real emails with a JavaMailer instance. Therefore, testing the sent Strings is impossible.
Recommended Solution
Mock the JavaMailer and return the String instead of delivering it to the SMTP server.
Alternatives
Keeping the test as "real" as possible and using it only if testing of email functionality is required. So the test class have to stay ignored by jUnit.
Adding a filter to the noreply gmail account and use it for fetching all mails. They should be grouped within a folder to make bulk deletion possible. (-> Better solution than mocking?)
The text was updated successfully, but these errors were encountered:
Circumstances
The EmailServiceTest class sends real emails with a JavaMailer instance. Therefore, testing the sent Strings is impossible.
Recommended Solution
Mock the JavaMailer and return the String instead of delivering it to the SMTP server.
Alternatives
The text was updated successfully, but these errors were encountered: