-
-
Notifications
You must be signed in to change notification settings - Fork 856
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
I'm currently trying to write unit tests for my services. One of these services uses MailKit to fetch some messages with attachments.
I can almost mock everything (using IImapClient, IMailFolder) except MimeMessage, because the Attachments property is not overridable.
Describe the solution you'd like
I'd like IMailFolder to return IMimeMessage on GetMessage/GetMessageAsync, so that I can return a mock implementation.
Describe alternatives you've considered
I considered simply creating a non-mocked instance of MimeMessage, which works fine. Still, it would be nice to be able to properly mock every aspect (for call counting, exception throwing, etc.)
danzuep
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request