/// <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; }
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); }