Esempio n. 1
0
 public void TestSearchbySentTo()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method to receive the result
     //PNR result
     var rresult = controller.Search(sentto: "*****@*****.**") as System.Web.Mvc.ViewResult;
     var model = (MvcApplication1.Models.RecipientModel)rresult.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]);
 }
Esempio n. 2
0
 public void TestSearchbyNotificationName()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method to receive the result
     //PNR result
     var nresult = controller.Search(notificationdesc: "Galileo-Bookings-1G-BK-201311270605.XML") as System.Web.Mvc.ViewResult;
     var model = (MvcApplication1.Models.NotificationsReportModel)nresult.ViewData.Model;
     Assert.AreEqual("4091", model.NotificationID[0]);
     Assert.AreEqual("Galileo-Bookings-1G-BK-201311270605.XML", model.NotificationDescription[0]);
     Assert.AreEqual("2013-11-27 06:05:32.310", model.SendDateTime[0]);
     Assert.AreEqual("PNR", model.LanguageType[0]);
     Assert.AreEqual(5, model.RecipientCount[0]);
 }
Esempio n. 3
0
 public void TestSearchbyPNR()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method to receive the result
     //PNR result
     var pnrresult = controller.Search(pnr: "8OAFK8") as System.Web.Mvc.ViewResult;
     var model = (MvcApplication1.Models.ExtractsModel)pnrresult.ViewData.Model;
     Assert.AreEqual("55989", model.ExtractID[0]);
     Assert.AreEqual("8OAFK8", model.PNR[0]);
     Assert.AreEqual("MR JENS ALMDAL", model.LeadPaxName[0]);
     Assert.AreEqual("1", model.TotalPax[0]);
     Assert.AreEqual("05/12/2013", model.UploadDateTime[0]);
     Assert.AreEqual("20131119", model.BookingDate[0]);
     Assert.AreEqual("", model.EmailAddress[0]);
     Assert.AreEqual("", model.OtherPhone[0]);
     Assert.AreEqual("EN", model.LanguageCode[0]);
     Assert.AreEqual(10, model.NumberofFlights[0]);
 }
Esempio n. 4
0
 public void TestSearchbyDataSourceName()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method to receive the result
     var dsresult = controller.Search(datasourcename: "1G-BK-201311280928.XML") as System.Web.Mvc.ViewResult;
     //Cast the result as the appropriate Model
     var model = (MvcApplication1.Models.DataSourcesModel)dsresult.ViewData.Model;
     Assert.AreEqual("4247976", model.DataSourceID[0]);
     Assert.AreEqual("1G-BK-201311280928.XML", model.DataSourceID[0]);
     Assert.AreEqual("2013-11-28 09:28:31.217", model.UploadDateTime[0]);
     Assert.AreEqual("XML", model.DataSourceType[0]);
     Assert.AreEqual(16, model.ExtractsCount[0]);
 }