Anonymous     Text only     31 Aug 2011    
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
using (var client = new FlightBookingServiceClient("BasicHttpBinding_IFlightBookingService"))
using (new OperationContextScope(client.InnerChannel)) {
string sessionId = ticketGatewayApi.Authenticate();
string sequenceId = ServiceSequenceId;
SearchRegularResult searchRegularRes = ticketGatewayApi.GetSearchRegularResults(Json, sessionId, sequenceId);
string valuateVar =
JsonConvert.SerializeObject(
new ValuateInput {
offer = searchRegularRes.offers.First(),
sequenceid = searchRegularRes.sequenceId,
sessionid = searchRegularRes.sessionId
});
FlightValuateOutput valuateRes = ticketGatewayApi.ValuateOffer(valuateVar);
Assert.AreNotEqual(searchRegularRes.offers[0].price, valuateRes.Offer.Price);
}