Chinaunix首页 | 论坛 | 博客
  • 博客访问: 669017
  • 博文数量: 53
  • 博客积分: 830
  • 博客等级: 准尉
  • 技术积分: 1089
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-31 18:23
文章存档

2019年(1)

2018年(1)

2016年(1)

2015年(1)

2014年(12)

2013年(4)

2012年(33)

分类: C#/.net

2014-04-09 13:34:45

//---------------------------------------------
//Script Title        :
//Script Description  :
//
//
//Recorder Version    :
//---------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
namespace Script
{
    public partial class VuserClass
    {
        public int Action()
        {
            try
            {
                lr.start_transaction("一中心短");
                GetHotelListResponse res = GetHotelListTest();

                if (res.ListSearchResult.HotelAistInventorys.Count == 10)
                {
                    lr.end_transaction("一中心短", lr.PASS);
                    return lr.PASS;
                }
                else
                {
                    lr.end_transaction("一中心短", lr.FAIL);
                    return lr.FAIL;
                }
            }
            catch (Exception e)
            {
                lr.end_transaction("一中心短", lr.FAIL);
                lr.error_message(e.Message);
                return lr.FAIL;
            }     
        }

        public static GetHotelListResponse GetHotelListTest()
        {
  
            string ip = "192.168.31.8";  //2
        //    string ip = "192.168.98.99";
            RemoteListRequest request = new RemoteListRequest()
            {
                Request = new ListRequest()
                {
                    HotelIDs = "",
                }
            };
            request.Request.CityID = "0101";
            request.Request.CheckInDate = DateTime.Now.AddDays(1);
            request.Request.CheckOutDate = DateTime.Now.AddDays(2);
            GetHotelListResponse actual = ClientProxy.Excute(request, ip, 10001) as GetHotelListResponse;
            return actual;
        }
    }
}


阅读(1582) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~