Beispiel #1
0
        public void SelectShopRanking()
        {
            using (var client = new SexAnnualVoteClient())
            {
                var result = client.SelectShopRanking(new Models.Requests.SexAnnualVoteQueryRequest()
                {
                    PageIndex = 1,
                    PageSize  = 10
                });
                result.ThrowIfException(true);
                Assert.AreEqual(result.Result.Source.Any(), true);
                result = client.SelectShopRanking(new Models.Requests.SexAnnualVoteQueryRequest()
                {
                    PageIndex  = 1,
                    PageSize   = 10,
                    ProvinceId = 1
                });
                result.ThrowIfException(true);
                Assert.AreEqual(result.Result.Source.Any(), true);

                result = client.SelectShopRanking(new Models.Requests.SexAnnualVoteQueryRequest()
                {
                    PageIndex  = 1,
                    PageSize   = 10,
                    ProvinceId = 1,
                    Keywords   = "22"
                });
                result.ThrowIfException(true);
                Assert.AreEqual(result.Result.Source.Any(), true);
            }
        }
Beispiel #2
0
 public void GetShopEmployeeRegionAsync()
 {
     using (var client = new SexAnnualVoteClient())
     {
         var result = client.GetShopEmployeeRegion();
         result.ThrowIfException(true);
         Assert.AreEqual(result.Result.Count > 0, true);
     }
 }
Beispiel #3
0
 public void AddShareShopVote()
 {
     using (var client = new SexAnnualVoteClient())
     {
         var result = client.AddShareShopVote(Guid.Parse("{607084d4-36fc-4f37-94b7-b68c77921f60}"), 1);
         result.ThrowIfException(true);
         Assert.AreEqual(result.Result, true);
     }
 }
Beispiel #4
0
 public void FetchShopEmployeeDetail()
 {
     using (var client = new SexAnnualVoteClient())
     {
         var result = client.FetchShopEmployeeDetail(11727, 10319);
         result.ThrowIfException(true);
         Assert.AreEqual(result.Result == null, false);
     }
 }
Beispiel #5
0
 public void AddShareShopEmployeeVote()
 {
     using (var client = new SexAnnualVoteClient())
     {
         var result =
             client.AddShareShopEmployeeVote(Guid.Parse("{208592FF-19BE-41A4-AF18-4FBFD8D3281A}"), 1, 1);
         result.ThrowIfException(true);
         Assert.AreEqual(result.Result, true);
     }
 }
Beispiel #6
0
 public void SelectShopEmployeeVoteRecord()
 {
     using (var client = new SexAnnualVoteClient())
     {
         var result = client.SelectShopEmployeeVoteRecord(Guid.Parse("{607084d4-36fc-4f37-94b7-b68c77921f60}"),
                                                          DateTime.Now, DateTime.Now);
         result.ThrowIfException(true);
         Assert.AreEqual(result.Result.Any(), true);
     }
 }
Beispiel #7
0
 public void CheckEmployeeSignUp()
 {
     using (var client = new SexAnnualVoteClient())
     {
         var result = client.CheckEmployeeSignUp(1, 1);
         result.ThrowIfException(true);
         Assert.AreEqual(result.Result, true);
         result = client.CheckEmployeeSignUp(1, 0);
         result.ThrowIfException(true);
         Assert.AreEqual(result.Result, false);
     }
 }
Beispiel #8
0
 public void AddShopSignUp()
 {
     using (var client = new SexAnnualVoteClient())
     {
         var result = client.AddShopSignUp(new Models.ShopVoteModel()
         {
             ShopId        = 1,
             Area          = "50平方米",
             CreateDate    = "2016年",
             Description   = "介绍",
             ImageUrls     = Newtonsoft.Json.JsonConvert.SerializeObject(new string[] { "1", "2" }),
             EmployeeCount = 2
         });
         result.ThrowIfException(true);
         Assert.AreEqual(result.Result, true);
     }
 }
Beispiel #9
0
 public void AddEmployeeSignUp()
 {
     using (var client = new SexAnnualVoteClient())
     {
         var result = client.AddEmployeeSignUp(new Models.ShopEmployeeVoteModel()
         {
             Age               = 1,
             City              = "上海",
             Description       = "介绍",
             EmployeeId        = 1,
             ExpertiseModels   = "路虎",
             ExpertiseProjects = "轮胎",
             Hobby             = "没有",
             ImageUrls         = Newtonsoft.Json.JsonConvert.SerializeObject(new string[] { "1", "2" }),
             Name              = "张三",
             ShopId            = 1,
             VideoUrl          = "",
             YearsEmployed     = 1
         });
         result.ThrowIfException(true);
         Assert.AreEqual(result.Result, true);
     }
 }