Commit abdf6335 authored by 赵然's avatar 赵然

Merge branch 'develop' into zr

parents 6c04673f c73bf836
......@@ -23,7 +23,8 @@ import static io.restassured.RestAssured.given;
* Created by panyuli on 2018/07/06.
*/
public class 优惠券_兑换流程测试pyl_ExchangeTest extends CheckTemplet {
public class 优惠券_兑换异常测试_ExchangeTest extends CheckTemplet {
@Autowired
private MobileService mobileService;
......
......@@ -42,4 +42,26 @@ public class VirtualExchangeService {
return response;
}
public Response exchange2(Map cookies, String appItemId,String degreeId) throws Exception {
Map<String,String> map = new HashMap<>();
map.put("appItemId",appItemId);
map.put("degreeId",degreeId);
map.put("token","xz9eyi");
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
try{
Assert.assertEquals(String.valueOf(response.getStatusCode()), "200", "/objectExchange/exchange接口返回异常");
}catch(Exception e){
throw new Exception("/objectExchange/exchange接口返回异常,返回信息:"+response.asString());
}catch(Error er){
throw new Exception("/objectExchange/exchange接口返回异常,返回信息:"+response.asString());
}
return response;
}
}
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