package com.prolog.cs.biz.outbound.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.prolog.cs.biz.outbound.model.dto.BillDTO;
import com.prolog.cs.biz.outbound.service.BillService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;
import java.util.List;

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

    @Resource
    private BillService billService;

    @Test
    public void updateBill() {
        String msg = "[{\"id\":\"908804238803603456\",\"totalQty\":5110,\"warehouseId\":\"891420072483098624\",\"priority\":9999}]";
        List<BillDTO> list = JSONObject.parseArray(msg, BillDTO.class);
        billService.updateBill(list);
    }
}