// GET: AirlineInquiry
        public async Task <ActionResult> Index()
        {
            AirlineInquiryProxeyRequest  request  = new AirlineInquiryProxeyRequest();
            AirlineInquiryProxeyResponse response = await new AirlineInquiryCallInvoker().Call(request);

            if (response.ResponseCode == (int)HttpStatusCode.OK)
            {
            }

            return(View());
        }
Exemplo n.º 2
0
        public void TestCall()
        {
            AirlineInquiryProxeyRequest req = new AirlineInquiryProxeyRequest();

            req.DepartureAirportCode = "MEl";
            req.ArrivalAirportCode   = "LHR";
            req.DepartureDate        = "2012-12-24T00:00:00+11:00";
            req.ReturnDate           = "2013-01-03T00:00:00+11:00";

            AirlineInquiryCallInvoker    invoker = new AirlineInquiryCallInvoker();
            AirlineInquiryProxeyResponse res     = invoker.Call(req).Result;

            Assert.AreEqual(200, res.ResponseCode);
        }
Exemplo n.º 3
0
        public void TestParseJsonRequest()
        {
            AirlineInquiryProxeyRequest req = new AirlineInquiryProxeyRequest();

            req.DepartureAirportCode = "MEl";
            req.ArrivalAirportCode   = "LHR";
            req.DepartureDate        = "2012-12-24T00:00:00+11:00";
            req.ReturnDate           = "2013-01-03T00:00:00+11:00";

            AirlineOneInquiryCallParser parser = new AirlineOneInquiryCallParser();
            string result = parser.ParseJsonRequest(req);

            Assert.AreEqual("{\"DepartureAirportCode\":\"MEl\",\"ArrivalAirportCode\":\"LHR\",\"DepartureDate\":\"2012-12-24T00:00:00+11:00\",\"ReturnDate\":\"2013-01-03T00:00:00+11:00\"}", result);
        }