public void TestUpdateReview() { string requestData = "{\"userId\":\"" + Setting.UserId + "\", \"reviewId\":\"43F62B79-F860-43CF-9B17-30EBA057AD73\", \"content\":\"修改后内容\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.ReviewSV.svc/UpdateReview"); string retJson = rest.Execute(requestData); ResultDTO returnDTO = JsonHelper.JsonDeserialize <ResultDTO>(retJson); }
public void TestGetReplyByReviewId() { string requestData = "{\"userId\":\"" + Setting.UserId + "\", \"reviewId\":\"43F62B79-F860-43CF-9B17-30EBA057AD73\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.ReviewSV.svc/GetReplyByReviewId"); string retJson = rest.Execute(requestData); List <ReplySDTO> returnDTO = JsonHelper.JsonDeserialize <List <ReplySDTO> >(retJson); }
public void TestGetReviewNum() { string requestData = "{\"appId\":\"" + Setting.AppId + "\", \"commodityId\":\"3AAE2EBB-25F2-4743-A173-93DA170D0A21\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.ReviewSV.svc/GetReviewNum"); string retJson = rest.Execute(requestData); NumResultSDTO returnDTO = JsonHelper.JsonDeserialize <NumResultSDTO>(retJson); }
public void TestGetWantCommodity() { string requestData = "{\"appId\":\"" + Setting.AppId + "\", \"pageIndex\":1, \"want\":\"衣\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.CommoditySV.svc/GetWantCommodity"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestGetPromotionItems() { string requestData = "{\"promotionId\":\"3BA8661D-CFD2-4046-A9CF-349630E7B6B7\",\"appId\":\"" + Setting.AppId + "\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.PromotionSV.svc/GetPromotionItems"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestGetCommodityDetails() { string requestData = "{\"appId\":\"" + Setting.AppId + "\", \"commodityId\":\"\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.CommoditySV.svc/GetCommodityDetails"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestSaveCollection() { string requestData = "{\"appId\":\"" + Setting.AppId + "\", \"commodityId\":\"B1777D62-68E2-4B21-BA06-EA679E291DFD\",\"userId\":\"" + Setting.UserId + "\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.CollectionSV.svc/SaveCollection"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestGetReviewByCommodityId() { string requestData = "{\"appId\":\"" + Setting.AppId + "\", \"commodityId\":\"3AAE2EBB-25F2-4743-A173-93DA170D0A21\",\"lastReviewTime\":" + JsonHelper.JsonSerializer <DateTime>(DateTime.Now.AddYears(30)) + "}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.ReviewSV.svc/GetReviewByCommodityId"); string retJson = rest.Execute(requestData); List <ReviewSDTO> returnDTO = JsonHelper.JsonDeserialize <List <ReviewSDTO> >(retJson); }
public void TestSaveCommodityOrder() { OrderSDTO orderSDTO = new OrderSDTO(); orderSDTO.AppId = Guid.Parse(Setting.AppId); orderSDTO.City = "北京"; orderSDTO.District = "海淀区"; orderSDTO.Price = 50; orderSDTO.Province = "北京"; orderSDTO.ReceiptAddress = "上地东路1号盈创动力大厦A座北厅401室"; orderSDTO.ReceiptPhone = "15810819038"; orderSDTO.ReceiptUserName = "******"; orderSDTO.State = 0; orderSDTO.UserId = Guid.Parse(Setting.UserId); orderSDTO.ShoppingCartItemSDTO = new List <ShoppingCartItemSDTO>(); ShoppingCartItemSDTO good = new ShoppingCartItemSDTO(); good.Id = Guid.Parse("3AAE2EBB-25F2-4743-A173-93DA170D0A21"); good.CommodityNumber = 2; good.SizeAndColorId = "cbdd46a6-08ec-45fc-98ae-a7f65da3f96f,2802acc0-9a02-4d2f-880f-cf48ac0d30dc"; //good.SizeAndColorId orderSDTO.ShoppingCartItemSDTO.Add(good); string requestData = "{\"appId\":\"" + Setting.AppId + "\", \"orderSDTO\":" + JsonHelper.JsonSerializer <OrderSDTO>(orderSDTO) + "}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.CommodityOrderSV.svc/SaveCommodityOrder"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestGetStoreByProvince() { string requestData = "{\"province\":\"北京\",\"appId\":\"" + Setting.AppId + "\",\"pageIndex\":1}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.StoreSV.svc/GetStoreByProvince"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestGetOrderItems() { string requestData = "{\"appId\":\"" + Setting.AppId + "\",\"userId\":\"2fc486f8-a775-49f8-91e7-05b7de72a003\", \"commodityorderId\":\"cd29a16e-2e4c-4c94-940b-be2a5b5ef3c7\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.CommodityOrderSV.svc/GetOrderItems"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestGetCommodityOrderByState() { string requestData = "{\"appId\":\"" + Setting.AppId + "\",\"userId\":\"2fc486f8-a775-49f8-91e7-05b7de72a003\", \"state\":\"\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.CommodityOrderSV.svc/GetCommodityOrderByState"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestDeleteDeliveryAddress() { string requestData = "{\"appId\":\"" + Setting.AppId + "\",\"addressId\":\"" + Setting.UserId + "\"}";; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.DeliveryAddressSV.svc/DeleteDeliveryAddress"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestGetCategory() { string requestData = "{\"appId\":\"" + Setting.AppId + "\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.CategorySV.svc/GetCategory"); string retJson = rest.Execute(requestData); List <CategorySDTO> returnDTO = JsonHelper.JsonDeserialize <List <CategorySDTO> >(retJson); }
public void TestDeleteCollection() { string requestData = "{\"appId\":\"" + Setting.AppId + "\", \"commodityId\":\"\",\"userId\":\"" + Setting.UserId + "\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.CollectionSV.svc/DeleteCollection"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestGetNewPromotion() { string requestData = "{\"appId\":\"" + Setting.AppId + "\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.PromotionSV.svc/GetNewPromotion"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestGetReviewByUserId() { string requestData = "{\"appId\":\"" + Setting.AppId + "\", \"userId\":\"" + Setting.UserId + "\",\"lastReviewTime\":" + JsonHelper.JsonSerializer <DateTime>(DateTime.Now) + "}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.ReviewSV.svc/GetReviewByUserId"); string retJson = rest.Execute(requestData); List <ReviewSDTO> returnDTO = JsonHelper.JsonDeserialize <List <ReviewSDTO> >(retJson); }
public void TestGetShoppongCartItems() { string requestData = "{\"appId\":\"" + Setting.AppId + "\", \"userId\":\"2fc486f8-a775-49f8-91e7-05b7de72a003\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.ShoppingCartSV.svc/GetShoppongCartItems"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestDeleteShoppingCart() { string requestData = "{\"appId\":\"" + Setting.AppId + "\", \"userId\":\"2fc486f8-a775-49f8-91e7-05b7de72a003\", \"shopCartItemId\":\"941063CF-490D-4CDE-8169-860537ADE06C\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.ShoppingCartSV.svc/DeleteShoppingCart"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestDeleteMessage() { string requestData = "{\"messageId\":\"\",\"appId\":\"" + Setting.AppId + "\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.MessageSV.svc/DeleteMessage"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestGetMessage() { string time = JsonHelper.JsonSerializer <DateTime>(DateTime.Now); string requestData = "{\"appId\":\"" + Setting.AppId + "\", \"lastTime\":" + time + ",\"userId\":\"" + Setting.UserId + "\"}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.MessageSV.svc/GetMessage"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestSaveShoppingCart() { ShoppingCartItemSDTO shoppingCartItemSDTO = new ShoppingCartItemSDTO(); shoppingCartItemSDTO.Id = Guid.Parse("3AAE2EBB-25F2-4743-A173-93DA170D0A21"); shoppingCartItemSDTO.CommodityNumber = 2; shoppingCartItemSDTO.SizeAndColorId = "cbdd46a6-08ec-45fc-98ae-a7f65da3f96f,2802acc0-9a02-4d2f-880f-cf48ac0d30dc"; string requestData = "{\"appId\":\"" + Setting.AppId + "\", \"userId\":\"2fc486f8-a775-49f8-91e7-05b7de72a003\",\"shoppingCartItemsSDTO\":" + JsonHelper.JsonSerializer <ShoppingCartItemSDTO>(shoppingCartItemSDTO) + "}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.ShoppingCartSV.svc/SaveShoppingCart"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestReplyReview() { ReplySDTO replySDTO = new Deploy.CustomDTO.ReplySDTO(); replySDTO.Details = "这是回复内容"; replySDTO.PreId = Guid.Parse(Setting.UserId); replySDTO.ReplyerHead = ""; replySDTO.ReplyerId = Guid.Parse(Setting.AppId); replySDTO.ReplyerName = "商家"; replySDTO.ReviewId = Guid.Parse("43F62B79-F860-43CF-9B17-30EBA057AD73"); replySDTO.SubTime = DateTime.Now; string requestData = "{\"appId\":\"" + Setting.AppId + "\", \"replySDTO\":" + JsonHelper.JsonSerializer <ReplySDTO>(replySDTO) + "}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.ReviewSV.svc/ReplyReview"); string retJson = rest.Execute(requestData); ResultDTO returnDTO = JsonHelper.JsonDeserialize <ResultDTO>(retJson); }
public void TestSaveDeliveryAddress() { AddressSDTO addressSDTO = new AddressSDTO(); addressSDTO.AppId = Guid.Parse(Setting.AppId); addressSDTO.UserId = Guid.Parse(Setting.UserId); addressSDTO.City = "北京"; addressSDTO.District = "海淀区"; addressSDTO.Province = "北京"; addressSDTO.ReceiptAddress = "上地东路1号盈创动力大厦A座北厅401室"; addressSDTO.ReceiptPhone = "15810819038"; addressSDTO.ReceiptUserName = "******"; string requestData = "{\"addressDTO\":" + JsonHelper.JsonSerializer <AddressSDTO>(addressSDTO) + "}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.DeliveryAddressSV.svc/SaveDeliveryAddress"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }
public void TestSaveReview() { ReviewSDTO reviewSDTO = new Deploy.CustomDTO.ReviewSDTO(); reviewSDTO.AppId = Guid.Parse(Setting.AppId); // reviewSDTO.CommodityColor = "黑色"; reviewSDTO.OrderItemId = Guid.Parse("3AAE2EBB-25F2-4743-A173-93DA170D0A21"); // reviewSDTO.CommoditySize = "XL"; reviewSDTO.Details = "很漂亮"; reviewSDTO.Name = "评论人昵称"; reviewSDTO.UserId = Guid.Parse(Setting.UserId); //reviewSDTO.SelectedComAttibutes = null; reviewSDTO.Replays = null; reviewSDTO.SubTime = DateTime.Now; reviewSDTO.UserHead = ""; string requestData = "{\"appId\":\"" + Setting.AppId + "\", \"reviewSDTO\":" + JsonHelper.JsonSerializer <ReviewSDTO>(reviewSDTO) + "}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.ReviewSV.svc/SaveReview"); string retJson = rest.Execute(requestData); ResultDTO returnDTO = JsonHelper.JsonDeserialize <ResultDTO>(retJson); }
public void TestUpdateShoppingCart() { List <ShopCartCommodityUpdateDTO> list = new List <ShopCartCommodityUpdateDTO>(); ShopCartCommodityUpdateDTO shoppingCartItemSDTO = new ShopCartCommodityUpdateDTO(); shoppingCartItemSDTO.ShopCartItemId = Guid.Parse("598FCC6D-6939-4863-A2B9-19A5F7093651"); shoppingCartItemSDTO.Number = 2; list.Add(shoppingCartItemSDTO); ShopCartCommodityUpdateDTO shoppingCartItemSDTO2 = new ShopCartCommodityUpdateDTO(); shoppingCartItemSDTO2.ShopCartItemId = Guid.Parse("B7BA0FAE-622C-4BAA-8061-194DB893665D"); shoppingCartItemSDTO2.Number = 1; list.Add(shoppingCartItemSDTO2); string requestData = "{\"appId\":\"" + Setting.AppId + "\", \"userId\":\"2fc486f8-a775-49f8-91e7-05b7de72a003\", \"shopCartCommodityUpdateDTOs\":" + JsonHelper.JsonSerializer <List <ShopCartCommodityUpdateDTO> >(list) + "}"; var rest = new RestRequestTest("Jinher.AMP.BTP.SV.ShoppingCartSV.svc/UpdateShoppingCart"); string retJson = rest.Execute(requestData); //ReturnDTO returnDTO = JsonHelper.JsonDeserialize<ReturnDTO>(retJson); }