private void SendToMail() { IPostman postman = new GmailPostman(_logger, "*****@*****.**", "123456vkr^^", "TesterSfedu"); postman.Send( mailBox.Text, $"{fullnameBox.Text}_{groupBox.Text}_{yearsBox.Text}_{semesterBox.Text}_{subjectNameBox.Text}", _runResult.Result, MakePrefix ); }
private static void Main(String[] args) { using (var logger = new StreamLogger(new StreamWriter(DateTime.Now.Date.ToString("dd/MM/yyyy") + ".log") { AutoFlush = true })) { var parser = new FluentCommandLineParser(); String exe = null; String path = null; parser.Setup <String>("p", longOption: "path") .Callback(e => path = e); parser.Setup <String>("e", longOption: "exe") .Callback(e => exe = e); parser.Parse(args); logger.Info(exe); ITester tester = new Tester( logger, new ZipCollectorTests( logger, path, new String[] { "228", "123" } ), new CheckAllTestsLauncher ( new OneTestRunner( logger, new FullStreamComparer(), exe ) ) ); var result = tester.Run(); List <TestResult> l = new List <TestResult>(result); IPostman postman = new GmailPostman(logger, "*****@*****.**", "123456vkr^^", "TesterSfedu"); postman.Send("*****@*****.**", "Test", l); } }
public void CorrectSend() { IPostman postman = new GmailPostman(Logger, "*****@*****.**", "123456vkr^^", "TesterSfedu"); postman.Send("*****@*****.**", "title", CreateSimpleTestResult()); }
public void NullMessage() { IPostman postman = new GmailPostman(Logger, "*****@*****.**", "123456vkr^^", "TesterSfedu"); postman.Send("*****@*****.**", "title", null); }
public void WrongEmail() { IPostman postman = new GmailPostman(Logger, "*****@*****.**", "123456vkr^^", "TesterSfedu"); postman.Send("eipii0yandex.ru", "title", Enumerable.Empty <ShellTester.TestResult>()); }