package cn.freemud.manager;

import cn.freemud.entities.dto.product.ProductInfo;
import cn.freemud.enums.ResponseResult;
import cn.freemud.utils.ResponseUtil;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.ArrayList;
import java.util.List;

/**
 * @author freemud
 * @title: BuyProductOnceTest
 * @projectName order-group
 * @description: TODO
 * @date 2021/6/10下午2:52
 */

@RunWith(SpringRunner.class)
@SpringBootTest
public class BuyProductOnceTest {

    @Autowired
    private BuyProductOnceManager buyProductOnceManager;

    @Test
    public void buyProductOnceTest(){
        List<ProductInfo> products = new ArrayList<>();
        ProductInfo productInfo = new ProductInfo();
        productInfo.setIsLimitNumProduct(1);
        products.add(productInfo);
        ResponseResult re = buyProductOnceManager.checkBuyProductOnce(products,"1864","wanghanghang");
        System.out.println(re.getCode() + "  " + re.getMessage());
    }


}
