I am really new to C# and am trying to troubleshoot a test of some code that uses Amazon SES to send email.
[TestMethod()]
public void SendEmailTest()
{
SESEmailProvider target = new SESEmailProvider();
string ToEmailAddresses = "[email protected]";
string FromEmailAddress = "[email protected]";
string Subject = "Test";
string EmailBody = "Hello world.";
string expected = string.Empty;
string actual;
actual = target.SendEmail(ToEmailAddresses, FromEmailAddress, Subject, EmailBody);
Assert.AreEqual(expected, actual);
Assert.Inconclusive("Verify the correctness of this test method.");
}
The error message in Visual Studio is:
string SESEmailProvider.SendEmail(
System.Collections.Generic.List<string> ToEmailAddresses,
string FromEmailAddress, string Subject, string EmailBody)
Error:
The best overloaded method match for 'MyServices.SESEmailProvider.SendEmail(
System.Collections.Generic.List<string>, string, string, string)'
has some invalid arguements.
I think the issue is that it's expecting ToEmailAddresses to be a list, not a single string, but I'm struggling to find a way to convert/handle this.
Thanks!