package com.sjyt.icom.asst.service;

import com.sjyt.icom.asst.common.enums.MsgTypeEnum;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;

/**
 * <p>TODO</p>
 *
 * @author renyanru
 * @version V1.0.0
 * @date 2022/6/16 12:45
 */
@RunWith(SpringRunner.class)
@SpringBootTest
@Slf4j
public class TestDemo {

    @Test
     public void test1(){
        Map<MsgTypeEnum, Function<MsgTypeEnum,Void>> msgTypeMap=new HashMap<>(16);
        msgTypeMap.put(MsgTypeEnum.ReqSponsor,reqAV1);
        msgTypeMap.put(MsgTypeEnum.RespAgree,reqAV1);
    }
    private  final Function<MsgTypeEnum,Void> reqAV1=(it)->{
        System.out.println(it);
        System.out.println("reqAV1");
        return null;
    };
    private  final Function<MsgTypeEnum,Void> reqAV2=(it)->{
        System.out.println(it);
        System.out.println("reqAV2");
        return null;
    };
}
