Ejemplo n.º 1
0
        /// <summary>
        /// Either sends back via comms or emails the inputted string in the string builder to me if there is no connection
        /// </summary>
        /// <param name="testRunInformation"></param>
        private void Message(StringBuilder testRunInformation)
        {
            DateTime buildCompleteTime = DateTime.Now;

            testRunInformation.AppendLine();
            testRunInformation.Append("Build Request completed at " + buildCompleteTime.ToShortTimeString());

            try
            {
                ClientComms.Send(testRunInformation.ToString());
            }
            catch
            {
                MailMessage mail   = new MailMessage("*****@*****.**", "*****@*****.**");
                SmtpClient  client = new SmtpClient("smtp.gmail.com", 587);

                mail.Subject = "Build Request";
                mail.Body    = testRunInformation.ToString();

                client.Port        = 587;
                client.Credentials = new System.Net.NetworkCredential("alawills", "favouriteprimes111929");
                client.EnableSsl   = true;

                client.Send(mail);
            }

            Console.WriteLine("Testing run complete");
        }
Ejemplo n.º 2
0
        protected override void ProcessMessage(byte[] data)
        {
            base.ProcessMessage(data);

            if (data.ConvertToString() == "Request Build")
            {
                ClientComms.Send("Build request confirmed");

                TestProject("CelesteEngine", "CelesteEngineUnitTestProject", Read2DEngineLogAndSendMessage);
            }
        }