package com.sw.common.accessory;

import com.sw.common.accessory.api.feignCilent.StoreFeignClients;
import com.sw.common.accessory.api.feignCilent.YbFeignClients;
import com.sw.common.accessory.api.model.AccessoryMaterialDto;
import com.sw.common.accessory.api.model.EquipmentDto;
import com.sw.common.accessory.api.model.WarehouseInputBillBo;
import com.sw.common.core.response.Result;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;


@Slf4j
@SpringBootTest(classes = MesAccyServerApplication.class)
public class UnitTest {

    @Autowired
    private StoreFeignClients storeFeignClients;

    @Autowired
    private YbFeignClients ybFeignClients;

    @Test
    public void m() throws Exception {
        Result<String> result = storeFeignClients.inputApply(new WarehouseInputBillBo());
        System.out.println(result.getCode());
        System.out.println(result.getData());
    }

    @Test
    public void m1() throws Exception {
        Result<EquipmentDto> result = ybFeignClients.getEquipmentInfo("A001");
        System.out.println(result.getCode());
        System.out.println(result.getData());
    }

    @Test
    public void m2() throws Exception {
        Result<AccessoryMaterialDto> result = ybFeignClients.getByMaterialId(30387L);
        System.out.println(result.getCode());
        System.out.println(result.getData());
    }
}

