package com.izouma.jiashanxia.service;

import com.izouma.jiashanxia.ApplicationTests;
import com.izouma.jiashanxia.domain.ShoppingCart;
import com.izouma.jiashanxia.dto.CreateCart;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;


public class ShoppingCartServiceTest extends ApplicationTests {

    @Autowired
    private ShoppingCartService shoppingCartService;

    @Test
    public void save() {
        CreateCart createCart = CreateCart.builder()
                .stockId(1009L)
                .packageId(17L)
                .num(1)
                .buyPhone("18200000000")
                .realName("XXX")
                .IDNo("32011100000")
                .build();
        ShoppingCart save = shoppingCartService.save(createCart, 916L);
        System.out.println(save);
    }
}