package com.liquidnet.service.galaxy;

import com.liquidnet.common.third.zxlnft.biz.ZxlnftBiz;
import lombok.extern.slf4j.Slf4j;
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.SpringJUnit4ClassRunner;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;

/**
 * @author AnJiabin <anjiabin@zhengzai.tv>
 * @version V1.0
 * @Description: TODO
 * @class: TestZxlnftBiz
 * @Package com.liquidnet.service.zxlnft.test
 * @Copyright: LightNet @ Copyright (c) 2021
 * @date 2022/2/21 11:44
 */
@Slf4j
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
public class TestZxlnftBiz {
    @Autowired
    private ZxlnftBiz zxlnftBiz;

    @Test
    public void getImageType(){
        String url = "https://zhixinliantest-1302317679.cos.ap-guangzhou.myqcloud.com/nft/4e40d5f6f65aa8ec9bc33ab424e0167e68783bbe95d4d265086314d749808eef/ZXLNFTIMAGE202202241512003609141721.jpg";
        String imageType = url.substring(url.lastIndexOf("."),url.length());
        System.out.println(imageType);
    }

    @Test
    public void buildHeader(){
        MultiValueMap<String, String> commonHeader = new LinkedMultiValueMap();
        zxlnftBiz.buildHeader(commonHeader);
        System.out.println(commonHeader.toString());
    }

    @Test
    public void buildPlatFormHeader(){
        MultiValueMap<String, String> commonHeader = new LinkedMultiValueMap();
        zxlnftBiz.buildPlatFormHeader(commonHeader);
        System.out.println(commonHeader.toString());
    }
}
