Commit 3b318b29 authored by 赵然's avatar 赵然

zr

parent ef6afeaf
/**
* Copyright (C), 2015-2018
* FileName: 购物车测试
* Author: zhaoran
* Date: 2018/12/10 19:45
* Description:
*/
package http.cases.SaasDeveloperTest;
import base.DuibaLog;
import base.DuibaTestBase;
import http.service.Activity.PkService;
import http.service.Authorization;
import http.service.Saas.MallService;
import io.restassured.response.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import static io.restassured.RestAssured.given;
public class 购物车测试 extends DuibaTestBase {
@Value("${activity.host}")
String activityHost;
@Autowired
MallService mallService;
@Autowired
Authorization authorization;
private DuibaLog logger = DuibaLog.getLogger();
private static Integer uid = 5415;
@Test
public void 加入购物车() throws Exception{
//获取当前购物车数量
Response response = mallService.getMallCount(uid);
response.prettyPrint();
logger.info("购物车当前的数量为:"+response.jsonPath().getString("data.trolleyItemCount"));
}
}
\ No newline at end of file
...@@ -22,7 +22,7 @@ import static io.restassured.RestAssured.given; ...@@ -22,7 +22,7 @@ import static io.restassured.RestAssured.given;
*/ */
@Service @Service
public class mallService { public class MallService {
@Value("${activity.host}") @Value("${activity.host}")
String activityHost; String activityHost;
......
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