Authored by chenchao

change 4 unit test

... ... @@ -107,13 +107,17 @@ public class SellerService {
return uidList;
}
public SellerBo getSellerWithAuth(Integer uid){
public SellerWrapper getBaseSellerWrapper(Integer uid){
SellerWrapper sellerWrapper = new SellerWrapper(uid,logger)
.storedSellerDataSource(storedSellerMapper::selectByUid)
.addSpecialSuperFunc(this::isSpecialSuper)
.buildBase();
return sellerWrapper;
}
public SellerBo getSellerWithAuth(Integer uid){
logger.info("getSellerWithAuth uid {}", uid);
SellerWrapper sellerWrapper = getBaseSellerWrapper(uid);
SellerLevelFuncBo slfb = sellerFuncService.getSellerLevelFunc(sellerWrapper);
SellerBo sellerBo = sellerWrapper.build();
sellerBo.setSellerLevelFunc(slfb);
... ...
package com.yohoufo.order.service;
import com.yohobuy.ufo.model.order.bo.SellerBo;
import com.yohobuy.ufo.model.order.common.EntrySellerType;
import com.yohoufo.order.BaseWebTest;
import com.yohoufo.order.service.impl.SellerEnterApplyService;
import com.yohoufo.order.service.impl.SellerService;
import com.yohoufo.order.service.impl.SellerWrapper;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -39,4 +41,12 @@ public class SellerEnterApplyServiceTest extends BaseWebTest {
long order = 6666666666L;
sellerEnterApplyService.audit(uid, order, new BigDecimal(100));
}
@Test
public void testChangeLevel4Super(){
int uid = 500031424;
SellerWrapper sellerWrapper =sellerService.getBaseSellerWrapper(uid);
BigDecimal left = new BigDecimal(100);
sellerEnterApplyService.changeLevel4Super(sellerWrapper, left);
}
}
... ...