package cn.freemud.amq;

import cn.freemud.ApiApplication;
import cn.freemud.amp.service.OrderCallBackMQService;
import com.alibaba.fastjson.JSON;
import com.freemud.application.sdk.api.ordercenter.entities.vo.OrderCallBackRequestVo;
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;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = ApiApplication.class)
public class OrderCallBackMQServiceTest {

    @Autowired
    OrderCallBackMQService orderCallBackMQService;
    @Test
    public void testSendOrderMQ() {
        OrderCallBackRequestVo body = JSON.parseObject("{\"orderCode\":\"demoData\",\"afterSalesCode\":\"demoData\",\"delayMsgEventType\":1,\"operateType\":1,\"orderClient\":1,\"partnerId\":\"demoData\",\"storeId\":\"demoData\",\"msgType\":\"demoData\",\"content\":\"demoData\",\"requestId\":\"demoData\"}",
                OrderCallBackRequestVo.class);
        orderCallBackMQService.sendCoupon(body);
    }
}
