package com.liquidnet.service.chime.test;

import com.liquidnet.common.third.shumei.util.ShumeiUtil;
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;

/**
 * @author AnJiabin <anjiabin@zhengzai.tv>
 * @version V1.0
 * @Description: TODO
 * @class: TestShumei
 * @Package com.liquidnet.service.chime.test
 * @Copyright: LightNet @ Copyright (c) 2021
 * @date 2021/9/8 13:43
 */
@Slf4j
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest
public class TestShumei {
    @Autowired
    private ShumeiUtil shumeiUtil;

    @Test
    public void checkText(){

//        System.out.println(shumeiUtil.checkText("user123","甜梅号的小茉莉"));
//        System.out.println(shumeiUtil.checkText("user123","158****8858"));
        System.out.println(shumeiUtil.checkText("user123","投毒"));
    }
    @Test
    public void checkImage(){
        //暴力血腥
//        String imageUrl = "https://image11.m1905.cn/uploadfile/s2010/0603/20100603015651967.jpg";
        //涉黄
//        String imageUrl = "https://img2.baidu.com/it/u=276463273,2526848266&fm=26&fmt=auto&gp=0.jpg";
//        shumeiUtil.checkImage("user123",imageUrl);

//        String imageUrl = "https://pic.zhengzai.tv/201504/99/ED/1430210597_92262BF907AF914B95A0FC33C3F33BF6.jpg";
//        shumeiUtil.checkImage("user123",imageUrl);

//        String imageUrl = "https://thirdwx.qlogo.cn/mmopen/vi_32/DYAIOgq83eoJpPNmEbdMy2icLxUmVOXn8nowU17d2ziaQqT1O5npf8D2UWz2HVhSpFZichkrAzVdFMicQ4100J7TmA/132";
        String imageUrl = "https://thirdqq.qlogo.cn/g?b=oidb&k=1wgQpJ7GaNZhTw8L9M8VSQ&s=100&t=1562575762";
        shumeiUtil.checkImage("user123",imageUrl);


    }
}
