Esempio n. 1
0
 public void TestViewRecipientsbyTopTen()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method to receive the result
     var result = controller.ViewRecipients() as System.Web.Mvc.ViewResult;
     //Cast the result as the appropriate Model
     var model = (MvcApplication1.Models.RecipientModel)result.ViewData.Model;
     Assert.AreEqual("56169", model.RecipientID[0]);
     Assert.AreEqual("[email protected],[email protected],[email protected]", model.SentTo[0]);
     Assert.AreEqual("2013-12-05 14:34:20.207", model.SendDateTime[0]);
     Assert.AreEqual("EMAIL", model.NotificationType[0]);
     Assert.AreEqual("Ticketing confirmation", model.TemplateName[0]);
     Assert.AreEqual(10, model.RecipientID.Count);
 }