package cn.axzo.msg.center.api;

import cn.axzo.msg.center.MsgCenterApplication;
import cn.axzo.msg.center.api.request.MnsSendCodeV2Req;
import lombok.RequiredArgsConstructor;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.HashMap;

import static org.junit.jupiter.api.Assertions.*;

/**
 * @author yanglin
 */
@SpringBootTest(classes = MsgCenterApplication.class)
@RequiredArgsConstructor(onConstructor_ = @Autowired)
class MNSNoticesApiTest {

    private final MNSNoticesApi mNSNoticesApi;

    @Test
    void exec() {
        HashMap<String, Object> param = new HashMap<>();
        int code = 15;
        param.put("code", code);
        MnsSendCodeV2Req req = new MnsSendCodeV2Req();
        req.setCode(code);
        req.setAppCode("pudge");
        req.setTemplateNo("pudge_100000031_regulatory");
        req.setParam(param);
        req.setPhone("18608045398");
        mNSNoticesApi.sendCodeV2(req);
    }

}