C
C#3y ago
KimPiks

Unit - integration tests for sending e-mails

Hi, I have a function which gets data from config and sends email to a specific address. Obtaining data from configuration, connecting to SMTP, I tested in unit tests. But I don't know what to do with sending emails. I use System.Net.Mail.SmtpClient which should be tested by M$ and I only send an email with this method (_smtpClient.Send(mailMessage);). Should I write additional test for this? How should I do that?
1 Reply
Becquerel
Becquerel3y ago
i wouldn't expend effort on testing the functionality of built-in libraries or packages
Want results from more Discord servers?
Add your server