package com.liquidnet.service.adam.service.impl;
import com.alibaba.fastjson.JSON;
import com.liquidnet.service.adam.entity.AdamSysCountry;
import com.liquidnet.service.adam.service.IAdamSysCountryService;
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.util.CollectionUtils;

import java.util.List;

/**
 * @author Li Chen
 * @date 2020-10-13 16:54
 */
@SpringBootTest
@RunWith(SpringRunner.class)
public class SysCountryServiceImplTest {
    @Autowired
    IAdamSysCountryService sysCountryService;

    @Test
    public void selectList() {

        AdamSysCountry sysCountry = new AdamSysCountry();

//        sysCountry.setCode("CN");

        sysCountry.setCurrencyAlphabeticCode("CNY");

        List<AdamSysCountry> sysCountries = sysCountryService.selectList(sysCountry);
        if(CollectionUtils.isEmpty(sysCountries)){
            System.out.println("不存在");
        }else {
            System.out.println("存在");
        }

        System.out.println(JSON.toJSONString(sysCountries));
    }

}