Esempio n. 1
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]);
 }