Skip to content

[FEATURE] Mock EmailServiceTest #3

@gstuer

Description

@gstuer

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?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions