Problem: When mocking MvcMailMessage with Moq, it is not possible to set
expectations for the MvcMailMessage Send methods because they use
optional parameters (which is not supported by Moq).
Solution: Overload methods to eliminate optional parameters without
breaking the public interface of the class.
Problem: When mocking MvcMailMessage with Moq, it is not possible to set expectations for the MvcMailMessage Send methods because they use optional parameters (which is not supported by Moq).
Solution: Overload methods to eliminate optional parameters without breaking the public interface of the class.