/// <summary>
        /// Sends email message
        /// </summary>
        /// <param name="subject">Subject of the message.</param>
        /// <param name="message">Message text</param>
        /// <param name="recipient">Email address of the message recipient.</param>
        /// <returns></returns>
        public string SendMessage(string subject, string message,
                                  string recipient)
        {
            // Code to send an email
            var confirmation = "Message sent: " + subject;

            LoggingService.LogAction(confirmation);
            return(confirmation);
        }
示例#2
0
        /// <summary>
        /// Sends email message
        /// </summary>
        /// <param name="subject">Subject of the message.</param>
        /// <param name="message">Message text</param>
        /// <param name="recipient">Email address of the message recipient.</param>
        /// <returns></returns>
        public string SendMessage(string subject, string message, string recipient)
        {
            //Missing implementation of send email

            var confirmation = "Message sent: " + subject;

            LoggingService.LogAction(confirmation);
            return(confirmation);
        }
        /// <summary>
        /// Sends email message
        /// </summary>
        /// <param name="subject">Subject of the message.</param>
        /// <param name="message">Message text</param>
        /// <param name="recipient">Email address of the message recipient.</param>
        /// <returns></returns>
        public string SendMessage(string subject, string message, 
                                  string recipient)
        {
            // Code to send an email

            var confirmation = "Message sent: " + subject;
            var loggingService = new LoggingService();
            loggingService.LogAction(confirmation);
            return confirmation;
        }
示例#4
0
        /// <summary>
        /// Sends email message
        /// </summary>
        /// <param name="subject">Subject of the message.</param>
        /// <param name="message">Message text</param>
        /// <param name="recipient">Email address of the message recipient.</param>
        /// <returns></returns>
        public string SendMessage(string subject, string message,
                                  string recipient)
        {
            // Code to send an email

            var confirmation = "Message sent: " + subject;

            // var loggingService = new LoggingService();  static oldugundan yanlıs ifade olur
            LoggingService.LogAction(confirmation);
            return(confirmation);
        }
        public void LogAction_Success()
        {
            // Arrange
            var loggingService = new LoggingService();
            var expected = "Action: Test Action";

            // Act
            var actual = loggingService.LogAction("Test Action");

            // Assert
            Assert.AreEqual(expected, actual);
        }