Commit 2e10d17e by 周晓航

购物车添加spock测试

parent 31a51a00
......@@ -6,6 +6,7 @@ import cn.freemud.entities.dto.calculate.ActivityCalculationDiscountResponseDto
import cn.freemud.entities.dto.product.CheckCartRequest
import cn.freemud.entities.vo.CartGoods
import cn.freemud.entities.vo.GetShoppingCartGoodsApportionRequestVo
import cn.freemud.service.CouponService
import cn.freemud.service.impl.calculate.CalculationSharingDiscountService
import cn.freemud.service.thirdparty.ActivityClient
import cn.freemud.service.thirdparty.ProductClient
......@@ -32,6 +33,7 @@ class ShoppingCartNewServiceImplTest extends Specification {
def activityClient = Mock(ActivityClient.class)
def productServiceImpl = new ProductServiceImpl()
def sharingDiscountService = new CalculationSharingDiscountService()
def couponService = new CouponServiceImpl()
void setup() {
shoppingCartNewServiceImpl.customerInfoManager = customerInfoManager
......@@ -39,6 +41,7 @@ class ShoppingCartNewServiceImplTest extends Specification {
shoppingCartNewServiceImpl.assortmentSdkService = assortmentSdkService
shoppingCartNewServiceImpl.activityAdapter = activityAdapter
shoppingCartNewServiceImpl.couponAdapter = couponAdapter
shoppingCartNewServiceImpl.couponService = couponService
// fisherman 测试过程中, 需要测试 新老算价需要自己 控制开关
shoppingCartNewServiceImpl.newSharing = "{\"type\":1,\"grayList\":\"2581\",\"enable\":true}"
shoppingCartNewServiceImpl.activityClient = activityClient
......@@ -70,6 +73,7 @@ class ShoppingCartNewServiceImplTest extends Specification {
def hasRequiredProducts = false
//code_v4商品券有问题 调用不通过
and: "调三方反馈参数 为自己的参数对象 "
customerInfoManager.getCustomerInfoByObject("eac53a53f8ae62def7f40cb1e47a1bd9791d95a8") >> customerInfoVo
......
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