Esempio n. 1
0
 public void TestDataSourcesReportbyNotificationID()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method in the controller which will return a report
     MvcApplication1.Models.DataSourcesModel model = controller.DataSourcesReport(notificationID: 5733);
     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]);
 }
Esempio n. 2
0
 public void TestExtractsReportbyDataSourceID()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method in the controller which will return a report
     MvcApplication1.Models.ExtractsModel model = controller.ExtractsReport(dataSourceID: 4365540);
     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. 3
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);
 }
Esempio n. 4
0
 public void TestViewPaxbyPaxID()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method to receive the result
     var result = controller.ViewPax(paxID: 18500) as System.Web.Mvc.ViewResult;
     //Cast the result as the appropriate Model
     var model = (MvcApplication1.Models.PaxModel)result.ViewData.Model;
     Assert.AreEqual("18500", model.PaxID[0]);
     Assert.AreEqual("CAROLINE", model.PaxFirst[0]);
     Assert.AreEqual("-", model.PaxMiddle[0]);
     Assert.AreEqual("HAGSTRAND", model.PaxLast[0]);
     Assert.AreEqual("MS", model.PaxTitle[0]);
     Assert.AreEqual("F", model.PaxGender[0]);
     Assert.AreEqual("ADT", model.PaxType[0]);
     Assert.AreEqual("1900-01-01 00:00:00.000", model.PaxDOB[0]);
 }
Esempio n. 5
0
 public void TestViewNotificationsbyTopTen()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method to receive the result
     var result = controller.ViewNotifications() as System.Web.Mvc.ViewResult;
     //Cast the result as the appropriate Model
     var model = (MvcApplication1.Models.NotificationsReportModel)result.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]);
     Assert.AreEqual(10, model.NotificationID.Count);
 }
Esempio n. 6
0
 public void TestViewFlightsbyFlightID()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method to receive the result
     var result = controller.ViewFlights(flightID: 24063) as System.Web.Mvc.ViewResult;
     //Cast the result as the appropriate Model
     var model = (MvcApplication1.Models.FlightsModel)result.ViewData.Model;
     Assert.AreEqual("24063", model.FlightID[0]);
     Assert.AreEqual("1", model.FlightLeg[0]);
     Assert.AreEqual("1266", model.FlightNumber[0]);
     Assert.AreEqual("LX", model.FlightCode[0]);
     Assert.AreEqual("2013-11-27 00:00:00.000", model.DepartureDate[0]);
     Assert.AreEqual("0710", model.DepartureTime[0]);
     Assert.AreEqual("CH", model.DepartureCountry[0]);
     Assert.AreEqual("ZRH", model.DepartureCity[0]);
     Assert.AreEqual("2013-11-27 00:00:00.000", model.ArrivalDate[0]);
     Assert.AreEqual("0900", model.ArrivalTime[0]);
     Assert.AreEqual("DK", model.ArrivalCountry[0]);
     Assert.AreEqual("CPH", model.ArrivalCity[0]);
     Assert.AreEqual("N", model.ScheduleChange[0]);
     Assert.AreEqual("Q", model.ServiceClass[0]);
     Assert.AreEqual("0150", model.Duration[0]);
 }
Esempio n. 7
0
 public void TestViewDataSourcesbyTopTen()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method to receive the result
     var result = controller.ViewDataSources() as System.Web.Mvc.ViewResult;
     //Cast the result as the appropriate Model
     var model = (MvcApplication1.Models.DataSourcesModel)result.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]);
     Assert.AreEqual(10, model.DataSourceID.Count);
 }
Esempio n. 8
0
 public void TestViewExtractsTbyRecipientID()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method to receive the result
     var result = controller.ViewExtracts(recipientID: 56170) as System.Web.Mvc.ViewResult;
     //Cast the result as the appropriate Model
     var model = (MvcApplication1.Models.ExtractsModel)result.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. 9
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. 10
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. 11
0
 public void TestRecipientsReportbyTopTen()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method in the controller which will return a report
     MvcApplication1.Models.RecipientModel model = controller.RecipientsReport();
     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);
 }
Esempio n. 12
0
 public void TestPaxReportbyPaxID()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method in the controller which will return a report
     MvcApplication1.Models.PaxModel model = controller.PaxReport(PaxID:18500);
     Assert.AreEqual("18500", model.PaxID[0]);
     Assert.AreEqual("CAROLINE", model.PaxFirst[0]);
     Assert.AreEqual("-", model.PaxMiddle[0]);
     Assert.AreEqual("HAGSTRAND", model.PaxLast[0]);
     Assert.AreEqual("MS", model.PaxTitle[0]);
     Assert.AreEqual("F", model.PaxGender[0]);
     Assert.AreEqual("ADT", model.PaxType[0]);
     Assert.AreEqual("1900-01-01 00:00:00.000", model.PaxDOB[0]);
 }
Esempio n. 13
0
 public void TestNotificationsReportbyTopTen()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method in the controller which will return a report
     //Execute report by NotificationID[0]
     MvcApplication1.Models.NotificationsReportModel model = controller.NotificationsReport();
     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]);
     Assert.AreEqual(10, model.NotificationID.Count);
 }
Esempio n. 14
0
 public void SetUp()
 {
     //create a controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
 }
Esempio n. 15
0
 public void TestFlightsReportbyFlightID()
 {
     //Create the Controller for the test
     var controller = new MvcApplication1.Controllers.ReportController();
     //Execute the method in the controller which will return a report
     MvcApplication1.Models.FlightsModel model = controller.FlightsReport(flightID: 24063);
     Assert.AreEqual("24063", model.FlightID[0]);
     Assert.AreEqual("1", model.FlightLeg[0]);
     Assert.AreEqual("1266", model.FlightNumber[0]);
     Assert.AreEqual("LX", model.FlightCode[0]);
     Assert.AreEqual("2013-11-27 00:00:00.000", model.DepartureDate[0]);
     Assert.AreEqual("0710", model.DepartureTime[0]);
     Assert.AreEqual("CH", model.DepartureCountry[0]);
     Assert.AreEqual("ZRH", model.DepartureCity[0]);
     Assert.AreEqual("2013-11-27 00:00:00.000", model.ArrivalDate[0]);
     Assert.AreEqual("0900", model.ArrivalTime[0]);
     Assert.AreEqual("DK", model.ArrivalCountry[0]);
     Assert.AreEqual("CPH", model.ArrivalCity[0]);
     Assert.AreEqual("N", model.ScheduleChange[0]);
     Assert.AreEqual("Q", model.ServiceClass[0]);
     Assert.AreEqual("0150", model.Duration[0]);
 }