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
                );
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
        public void CorrectSend()
        {
            IPostman postman = new GmailPostman(Logger, "*****@*****.**", "123456vkr^^", "TesterSfedu");

            postman.Send("*****@*****.**", "title", CreateSimpleTestResult());
        }
Ejemplo n.º 4
0
        public void NullMessage()
        {
            IPostman postman = new GmailPostman(Logger, "*****@*****.**", "123456vkr^^", "TesterSfedu");

            postman.Send("*****@*****.**", "title", null);
        }
Ejemplo n.º 5
0
        public void WrongEmail()
        {
            IPostman postman = new GmailPostman(Logger, "*****@*****.**", "123456vkr^^", "TesterSfedu");

            postman.Send("eipii0yandex.ru", "title", Enumerable.Empty <ShellTester.TestResult>());
        }