Commit 6216f845 authored by 赵然's avatar 赵然

zr

parent 0760b7a5
......@@ -69,7 +69,7 @@ public class Exchange_ExchangeTest extends CheckTemplet {
Map<String,String> map = authorization.dafuwengLogin(uid);
Assert.assertEquals(String.valueOf(response.getStatusCode()),"200","活动详情页请求异常");
//实物兑换
response = couponExchangeService.objectExchange(map,"159143","2619","null","z9sydmcs","null");
response = couponExchangeService.objectExchange(map,"159143","2619","null","yrJRr7Cddp2YeQd","null");
// response.prettyPrint();
//校验兑换成功
// Assert.assertEquals(response.jsonPath().getString("success"),"true");
......
......@@ -76,7 +76,7 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
Map<String, String> map = authorization.dafuwengLogin(uid);
Assert.assertEquals(String.valueOf(response.getStatusCode()), "200", "活动详情页请求异常");
//实物兑换
response = couponExchangeService.objectExchange(map, "159143", "2619", "null", "z9sydmcs", "null");
response = couponExchangeService.objectExchange(map, "159143", "2619", "null", "yrJRr7Cddp2YeQd", "null");
// response.prettyPrint();
//校验兑换成功
// Assert.assertEquals(response.jsonPath().getString("success"),"true");
......@@ -287,7 +287,7 @@ public class ObjectExchange_ExchangeTest extends CheckTemplet {
Map<String, String> map = authorization.dafuwengLogin(uid);
Assert.assertEquals(String.valueOf(response.getStatusCode()), "200", "活动详情页请求异常");
//实物兑换
response = couponExchangeService.objectExchange(map, "161100", null, "null", "z9sydmcs", "null");
response = couponExchangeService.objectExchange(map, "161100", null, "null", "yrJRr7Cddp2YeQd", "null");
// response.prettyPrint();
//校验兑换成功
// Assert.assertEquals(response.jsonPath().getString("success"),"true");
......
......@@ -54,7 +54,7 @@ public class 实物_兑换异常测试_ExchangeTest extends CheckTemplet {
Map<String, String> map = authorization.dafuwengLogin(3086);
Assert.assertEquals(String.valueOf(response.getStatusCode()), "200", "活动详情页请求异常");
//实物兑换
response = couponExchangeService.objectExchange(map, "167141", "28515", "null", "z9sydmcs", "null");
response = couponExchangeService.objectExchange(map, "167141", "28515", "null", "yrJRr7Cddp2YeQd", "null");
response.prettyPrint();
//校验兑换成功
// Assert.assertEquals(response.jsonPath().getString("success"),"true");
......@@ -91,7 +91,7 @@ public class 实物_兑换异常测试_ExchangeTest extends CheckTemplet {
Map<String, String> map = authorization.dafuwengLogin(uid);
Assert.assertEquals(String.valueOf(response.getStatusCode()), "200", "活动详情页请求异常");
//实物兑换
Response response1 = couponExchangeService.objectExchange1(map, "167611", "28633", "null", "z9sydmcs", "null");
Response response1 = couponExchangeService.objectExchange1(map, "167611", "28633", "null", "yrJRr7Cddp2YeQd", "null");
response1.prettyPrint();
//校验兑换成功
// Assert.assertEquals(response.jsonPath().getString("success"),"true");
......@@ -132,7 +132,7 @@ public class 实物_兑换异常测试_ExchangeTest extends CheckTemplet {
String message=null;
String succcess = null;
try{
Response response = couponExchangeService.objectExchange1(authorization.dafuwengLogin(uid), "178880", "31050", "null", "z9sydmcs", "null");
Response response = couponExchangeService.objectExchange1(authorization.dafuwengLogin(uid), "178880", "31050", "null", "yrJRr7Cddp2YeQd", "null");
message = response.jsonPath().getString("message");
}catch (Exception e){
......@@ -148,7 +148,7 @@ public class 实物_兑换异常测试_ExchangeTest extends CheckTemplet {
int uid = 3490;
//第一次兑换
Response response = couponExchangeService.objectExchange(authorization.dafuwengLogin(uid), "178879", "31049", "null", "z9sydmcs", "null");
Response response = couponExchangeService.objectExchange(authorization.dafuwengLogin(uid), "178879", "31049", "null", "yrJRr7Cddp2YeQd", "null");
response.prettyPrint();
String orderId = response.jsonPath().getString("orderId");
......@@ -167,7 +167,7 @@ public class 实物_兑换异常测试_ExchangeTest extends CheckTemplet {
}
//第二次兑换
try{
response = couponExchangeService.objectExchange(authorization.dafuwengLogin(uid), "178879", "31049", "null", "z9sydmcs", "null");
response = couponExchangeService.objectExchange(authorization.dafuwengLogin(uid), "178879", "31049", "null", "yrJRr7Cddp2YeQd", "null");
response.prettyPrint();
}catch (Exception e){
......
......@@ -58,13 +58,13 @@ public class 平台券_兑换流程测试_ExchangeTest extends CheckTemplet {
Object[][] result = null;
if (method.getName().equals("平台券库存不足测试")) {
result = new Object[][]{
new Object[]{"73734759122009","n990y8dac","平台券商品库存不足测试"}, //case1
new Object[]{"73734793724984", "s4c0zy","平台券预分配库存不足测试"}, //case2
new Object[]{"73734759122009","yrJRr7Cddp2YeQd","平台券商品库存不足测试"}, //case1
new Object[]{"73734793724984", "yrJRr7Cddp2YeQd","平台券预分配库存不足测试"}, //case2
};
}
if(method.getName().equals("平台券预分配库存测试")){
result = new Object[][]{
new Object[]{"73734759122009","n990y8dac","平台券商品库存不足测试"}, //case1
new Object[]{"73734759122009","yrJRr7Cddp2YeQd","平台券商品库存不足测试"}, //case1
};
}
......@@ -158,7 +158,7 @@ public class 平台券_兑换流程测试_ExchangeTest extends CheckTemplet {
Map<String,String> map = new HashMap<>();
map.put("pcgId","73725292586909");
map.put("token","dnsog");
map.put("token","yrJRr7Cddp2YeQd");
//获取按钮状态
Response detailResponse = appPlatformCouponService.platformDetail(3086,true,"73725292586909");
......@@ -243,7 +243,7 @@ public class 平台券_兑换流程测试_ExchangeTest extends CheckTemplet {
//每日限额用完,无法再次兑换
Map<String,String> map = new HashMap<>();
map.put("pcgId","74735076603359");
map.put("token","dnsog");
map.put("token","yrJRr7Cddp2YeQd");
//获取按钮状态
Response detailResponse = appPlatformCouponService.platformDetail(uid,"74735076603359");
......@@ -282,7 +282,7 @@ public class 平台券_兑换流程测试_ExchangeTest extends CheckTemplet {
//用户限制次数用完,无法兑换
Map<String,String> map = new HashMap<>();
map.put("pcgId","74371944595109");
map.put("token","dnsog");
map.put("token","yrJRr7Cddp2YeQd");
//获取按钮状态
Response detailResponse = appPlatformCouponService.platformDetail(uid,"74371944595109");
......
......@@ -203,7 +203,7 @@ public class 支付宝_兑换流程测试_ExchangeTest extends CheckTemplet {
map.put("realname","沙箱环境");
map.put("degreeId","10");
map.put("itemId","55");
map.put("token","fw7qga0");
map.put("token","yrJRr7Cddp2YeQd");
Response response = given().contentType("application/x-www-form-urlencoded;charset=UTF-8").cookies(authorization.dafuwengLogin(3490)).params(map).post(url+"/alipayExchange/exchange");
response.prettyPrint();
......@@ -250,7 +250,7 @@ public class 支付宝_兑换流程测试_ExchangeTest extends CheckTemplet {
map.put("realname","沙箱环境");
map.put("degreeId","1");
map.put("itemId","55");
map.put("token","fw7qga0");
map.put("token","yrJRr7Cddp2YeQd");
//会员符合条件,兑换
Response successResponse = this.支付宝兑换(3574,"peeulk6392@sandbox.com","沙箱环境","1");
......@@ -282,7 +282,7 @@ public class 支付宝_兑换流程测试_ExchangeTest extends CheckTemplet {
map.put("realname",realName);
map.put("degreeId",degreeId);
map.put("itemId","55");
map.put("token","fw7qga0");
map.put("token","yrJRr7Cddp2YeQd");
try{
//支付宝兑换
......
......@@ -56,7 +56,7 @@ public class 异常订单测试_ExchangeTest extends DuibaTestBase {
Map<String, String> map = authorization.dafuwengLogin(uid,true);
Assert.assertEquals(String.valueOf(response.getStatusCode()), "200", "活动详情页请求异常");
//实物兑换
Response response1 = couponExchangeService.objectExchange1(map, "167611", "28633", "null", "z9sydmcs", "null");
Response response1 = couponExchangeService.objectExchange1(map, "167611", "28633", "null", "yrJRr7Cddp2YeQd", "null");
response1.prettyPrint();
String message2 = response1.jsonPath().getString("message");
......@@ -71,7 +71,7 @@ public class 异常订单测试_ExchangeTest extends DuibaTestBase {
Map<String, String> map = authorization.dafuwengLogin(4819);
Assert.assertEquals(String.valueOf(response.getStatusCode()), "200", "活动详情页请求异常");
//实物兑换
Response response2 = couponExchangeService.objectExchange2(map, "179139", "null", "null", "z9sydmcs", "null");
Response response2 = couponExchangeService.objectExchange2(map, "179139", "null", "null", "yrJRr7Cddp2YeQd", "null");
response2.prettyPrint();
String message3 = response2.jsonPath().getString("message");
......@@ -91,7 +91,7 @@ public class 异常订单测试_ExchangeTest extends DuibaTestBase {
// response.prettyPrint();
Assert.assertEquals(String.valueOf(response.getStatusCode()), "200", "活动详情页请求异常");
//实物兑换
Response response2 = couponExchangeService.objectExchange2(userCookies, "179139", "null", "null", "z9sydmcs", "null");
Response response2 = couponExchangeService.objectExchange2(userCookies, "179139", "null", "null", "yrJRr7Cddp2YeQd", "null");
response2.prettyPrint();
String message3 = response2.jsonPath().getString("message");
......@@ -110,7 +110,7 @@ public class 异常订单测试_ExchangeTest extends DuibaTestBase {
public void run() {
logger.info("开始执行 ");
try {
Response response2 = couponExchangeService.objectExchange2(userCookies, "179139", "null", "null", "z9sydmcs", "null");
Response response2 = couponExchangeService.objectExchange2(userCookies, "179139", "null", "null", "yrJRr7Cddp2YeQd", "null");
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -122,7 +122,7 @@ public class CouponExchangeService {
Map<String,String> map = new HashMap<>();
map.put("appItemId",appItemId);
map.put("itemId",itemId);
map.put("token","ds6tla07c");
map.put("token","yrJRr7Cddp2YeQd");
map.put("degreeId","1");
map.put("phone","18012341234");
map.put("phoneCatName","中国电信");
......@@ -148,7 +148,7 @@ public class CouponExchangeService {
public Response phonebillExchange(Map cookies,String degreeId) throws Exception {
Map<String,String> map = new HashMap<>();
map.put("token","ds6tla07c");
map.put("token","yrJRr7Cddp2YeQd");
map.put("degreeId",degreeId);
map.put("phone","18012341234");
map.put("phoneCatName","中国电信");
......@@ -174,7 +174,7 @@ public class CouponExchangeService {
public Response phoneflowExchange(Map cookies,String degreeId,String itemId,String phone,String phoneCatName,String phoneProvince) throws Exception {
Map<String,String> map = new HashMap<>();
map.put("itemId",itemId);
map.put("token","cmixdqn");
map.put("token","yrJRr7Cddp2YeQd");
map.put("degreeId",degreeId);
map.put("phone",phone);
map.put("phoneCatName",phoneCatName);
......@@ -224,7 +224,7 @@ public class CouponExchangeService {
Map<String,String> map = new HashMap<>();
map.put("appItemId",appItemId);
map.put("itemId",itemId);
map.put("token","xt7czv3c4");
map.put("token","yrJRr7Cddp2YeQd");
map.put("addrName","胡梦新");
map.put("addrPhone","18258853242");
map.put("addrProvince","浙江省");
......@@ -250,7 +250,7 @@ public class CouponExchangeService {
Map<String,String> map = new HashMap<>();
map.put("appItemId",appItemId);
map.put("itemId",itemId);
map.put("token","xt7czv3c4");
map.put("token","yrJRr7Cddp2YeQd");
map.put("addrName","胡梦新");
map.put("addrPhone","18258853242");
map.put("addrProvince","浙江省");
......@@ -279,7 +279,7 @@ public class CouponExchangeService {
map.put("realname","沙箱环境");
map.put("degreeId","1");
map.put("itemId",itemId);
map.put("token","jnwwwv");
map.put("token","yrJRr7Cddp2YeQd");
logger.info("请求/alipayExchange/exchange接口");
Response response = given().contentType("application/x-www-form-urlencoded;charset=UTF-8").cookies(authorization.dafuwengLogin(uid)).params(map).post("http://"+goodsHost+"/alipayExchange/exchange");
......
......@@ -30,7 +30,7 @@ public class QbExchangeService {
Map<String,String> map = new HashMap<>();
map.put("qq",qq);
map.put("degreeId",degreeId);
map.put("token","0nmfgduh8");
map.put("token","yrJRr7Cddp2YeQd");
Response response = given().params(map).cookies(cookies).post(activityHost+"/qbExchange/exchange");
......@@ -53,7 +53,7 @@ public class QbExchangeService {
Map<String,String> map = new HashMap<>();
map.put("qq",qq);
map.put("degreeId",degreeId);
map.put("token","0nmfgduh8");
map.put("token","yrJRr7Cddp2YeQd");
Response response = given().params(map).cookies(cookies).post(activityHost+"/qbExchange/exchange");
String message = response.jsonPath().getString("data.message");
......
......@@ -25,7 +25,7 @@ public class VirtualExchangeService {
Map<String,String> map = new HashMap<>();
map.put("appItemId",appItemId);
map.put("degreeId",degreeId);
map.put("token","xz9eyi");
map.put("token","yrJRr7Cddp2YeQd");
logger.info("请求/virtualExchange/exchange接口");
Response response = given().contentType("application/x-www-form-urlencoded;charset=UTF-8").cookies(cookies).params(map).post("http://"+goodsHost+"/virtualExchange/exchange");//couponExchange
......@@ -48,7 +48,7 @@ public class VirtualExchangeService {
Map<String,String> map = new HashMap<>();
map.put("appItemId",appItemId);
map.put("degreeId",degreeId);
map.put("token","xz9eyi");
map.put("token","yrJRr7Cddp2YeQd");
logger.info("请求/virtualExchange/exchange接口");
Response response = given().contentType("application/x-www-form-urlencoded;charset=UTF-8").cookies(cookies).params(map).post("http://"+goodsHost+"/virtualExchange/exchange");//couponExchange
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment