public void SendTest() { // Arrange var emailInfo = new UserEmailInformation("*****@*****.**", "Kelli Summers"); var emailMessage = new JudgeEmailMessage("Test Project 100", ProjectStage.Approved); var emailService = new EmailService(emailInfo, emailMessage); // Act emailService.Send(); }
public IActionResult Judge(string projectId, string stage, string emailAddress, string name) { ViewData["Message"] = "Determine application acceptance the application"; //var jObj = JsonConvert.DeserializeObject<JudgeObject>(data); int stg = Int32.Parse(stage); ProjectStage projectStage = (ProjectStage)stg; //UserEmailInformation emailInfo = jObj.userEmailInformation; UserEmailInformation emailInfo = new UserEmailInformation(emailAddress, name); int id = Int32.Parse(projectId); var currentProject = this.context.Projects.First(x => x.Id == id); currentProject.Stage = projectStage; this.context.SaveChanges(); var message = new JudgeEmailMessage(currentProject.Name, projectStage); var emailService = new EmailService(emailInfo, message); emailService.Send(); return(RedirectToAction("Index", "ApprovalsDashboard")); }