public GetFirstMessageText ( string sUsername, string sPassword ) : string | ||
sUsername | string | |
sPassword | string | |
return | string |
public static string AssertGetFirstMessageText(string accountName, string accountPassword) { // Wait for the message to appear. POP3Simulator pop3 = new POP3Simulator(); for (int i = 0; i < 5000; i++) { if (pop3.GetMessageCount(accountName, accountPassword) > 0) { break; } Thread.Sleep(20); } // Download it. string text = pop3.GetFirstMessageText(accountName, accountPassword); if (text.Length == 0) { Assert.Fail("Message was found but contents could not be received"); } return(text); }
public static string AssertGetFirstMessageText(string accountName, string accountPassword) { // Wait for the message to appear. POP3Simulator pop3 = new POP3Simulator(); for (int i = 0; i < 5000; i++) { if (pop3.GetMessageCount(accountName, accountPassword) > 0) break; Thread.Sleep(20); } // Download it. string text = pop3.GetFirstMessageText(accountName, accountPassword); if (text.Length == 0) Assert.Fail("Message was found but contents could not be received"); return text; }