package com.prolog.upcloud.base.wh.operate.controller;

import com.alibaba.fastjson.JSON;
import com.netflix.hystrix.strategy.concurrency.HystrixRequestContext;
import com.prolog.framework.authority.util.HystrixVarUtil;
import org.junit.After;
import org.junit.Before;
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 org.springframework.test.context.web.WebAppConfiguration;

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

@RunWith(SpringRunner.class)
@SpringBootTest
@WebAppConfiguration 
public class InvCheckControllerTest { 

    @Autowired
    private InvCheckController InvCheckController;
    
    @Before
    public void before() throws Exception { 
        HystrixRequestContext context = HystrixRequestContext.initializeContext();
        HystrixVarUtil.setUserKey("kzywms-admin");
    } 
    
    @After
    public void after() throws Exception { 
    } 

    @Test//System.out.println(JSON.toJSONString(InvCheckController.addInvCheck()));
    public void testAddInvCheck() throws Exception { 
        
    } 
    @Test//System.out.println(JSON.toJSONString(InvCheckController.addInvCheckAll()));
    public void testAddInvCheckAll() throws Exception { 
        String s="{\"warehouseId\":\"599581702716788736\",\"warehouseCode\":\"\",\"dcId\":\"\",\"warehouseName\":\"曲靖康桥仓\",\"bldgId\":\"\",\"bldgCode\":\"\",\"bldgName\":\"\",\"warehouseRoomId\":\"\",\"warehouseRoomCode\":\"\",\"warehouseRoomName\":\"\",\"warehouseAreaCategory\":\"\",\"cargoOwnerId\":\"E23A4BUUPPW\",\"cargoOwnerCode\":\"E23A4BUUPPW\",\"cargoOwnerName\":\"曲靖康桥\",\"checkWay\":\"1\",\"warehouseAreaName\":\"\",\"checkType\":\"1\",\"startDate\":\"\",\"endDate\":\"\"}";
        Map map=JSON.parseObject(s,Map.class);
        System.out.println(JSON.toJSONString(InvCheckController.addInvCheckAll(map)));
    }
    @Test//System.out.println(JSON.toJSONString(InvCheckController.updateInvCheck()));
    public void testUpdateInvCheck() throws Exception { 
        
    } 
    @Test//System.out.println(JSON.toJSONString(InvCheckController.examineInvCheck()));
    public void testExamineInvCheck() throws Exception { 
        
    } 
    @Test//System.out.println(JSON.toJSONString(InvCheckController.addInvCheckRe()));
    public void testAddInvCheckRe() throws Exception { 
        
    } 
        
} 
