Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
2e10d17e
Commit
2e10d17e
authored
Mar 04, 2022
by
周晓航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
购物车添加spock测试
parent
31a51a00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
shopping-cart-application-service/src/test/spock/cn/freemud/service/impl/ShoppingCartNewServiceImplTest.groovy
+4
-0
No files found.
shopping-cart-application-service/src/test/spock/cn/freemud/service/impl/ShoppingCartNewServiceImplTest.groovy
View file @
2e10d17e
...
@@ -6,6 +6,7 @@ import cn.freemud.entities.dto.calculate.ActivityCalculationDiscountResponseDto
...
@@ -6,6 +6,7 @@ import cn.freemud.entities.dto.calculate.ActivityCalculationDiscountResponseDto
import
cn.freemud.entities.dto.product.CheckCartRequest
import
cn.freemud.entities.dto.product.CheckCartRequest
import
cn.freemud.entities.vo.CartGoods
import
cn.freemud.entities.vo.CartGoods
import
cn.freemud.entities.vo.GetShoppingCartGoodsApportionRequestVo
import
cn.freemud.entities.vo.GetShoppingCartGoodsApportionRequestVo
import
cn.freemud.service.CouponService
import
cn.freemud.service.impl.calculate.CalculationSharingDiscountService
import
cn.freemud.service.impl.calculate.CalculationSharingDiscountService
import
cn.freemud.service.thirdparty.ActivityClient
import
cn.freemud.service.thirdparty.ActivityClient
import
cn.freemud.service.thirdparty.ProductClient
import
cn.freemud.service.thirdparty.ProductClient
...
@@ -32,6 +33,7 @@ class ShoppingCartNewServiceImplTest extends Specification {
...
@@ -32,6 +33,7 @@ class ShoppingCartNewServiceImplTest extends Specification {
def
activityClient
=
Mock
(
ActivityClient
.
class
)
def
activityClient
=
Mock
(
ActivityClient
.
class
)
def
productServiceImpl
=
new
ProductServiceImpl
()
def
productServiceImpl
=
new
ProductServiceImpl
()
def
sharingDiscountService
=
new
CalculationSharingDiscountService
()
def
sharingDiscountService
=
new
CalculationSharingDiscountService
()
def
couponService
=
new
CouponServiceImpl
()
void
setup
()
{
void
setup
()
{
shoppingCartNewServiceImpl
.
customerInfoManager
=
customerInfoManager
shoppingCartNewServiceImpl
.
customerInfoManager
=
customerInfoManager
...
@@ -39,6 +41,7 @@ class ShoppingCartNewServiceImplTest extends Specification {
...
@@ -39,6 +41,7 @@ class ShoppingCartNewServiceImplTest extends Specification {
shoppingCartNewServiceImpl
.
assortmentSdkService
=
assortmentSdkService
shoppingCartNewServiceImpl
.
assortmentSdkService
=
assortmentSdkService
shoppingCartNewServiceImpl
.
activityAdapter
=
activityAdapter
shoppingCartNewServiceImpl
.
activityAdapter
=
activityAdapter
shoppingCartNewServiceImpl
.
couponAdapter
=
couponAdapter
shoppingCartNewServiceImpl
.
couponAdapter
=
couponAdapter
shoppingCartNewServiceImpl
.
couponService
=
couponService
// fisherman 测试过程中, 需要测试 新老算价需要自己 控制开关
// fisherman 测试过程中, 需要测试 新老算价需要自己 控制开关
shoppingCartNewServiceImpl
.
newSharing
=
"{\"type\":1,\"grayList\":\"2581\",\"enable\":true}"
shoppingCartNewServiceImpl
.
newSharing
=
"{\"type\":1,\"grayList\":\"2581\",\"enable\":true}"
shoppingCartNewServiceImpl
.
activityClient
=
activityClient
shoppingCartNewServiceImpl
.
activityClient
=
activityClient
...
@@ -70,6 +73,7 @@ class ShoppingCartNewServiceImplTest extends Specification {
...
@@ -70,6 +73,7 @@ class ShoppingCartNewServiceImplTest extends Specification {
def
hasRequiredProducts
=
false
def
hasRequiredProducts
=
false
//code_v4商品券有问题 调用不通过
and:
"调三方反馈参数 为自己的参数对象 "
and:
"调三方反馈参数 为自己的参数对象 "
customerInfoManager
.
getCustomerInfoByObject
(
"eac53a53f8ae62def7f40cb1e47a1bd9791d95a8"
)
>>
customerInfoVo
customerInfoManager
.
getCustomerInfoByObject
(
"eac53a53f8ae62def7f40cb1e47a1bd9791d95a8"
)
>>
customerInfoVo
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment