package com.matrix;
|
|
import com.matrix.component.asyncmessage.AsyncMessageManager;
|
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;
|
|
import java.io.IOException;
|
import java.util.HashMap;
|
import java.util.Map;
|
|
/**
|
* 测试类示例
|
*
|
* @author jiangyouyao
|
* @email 512061637@qq.com
|
* @date 2019年2月25日
|
*/
|
@RunWith(SpringRunner.class)
|
@SpringBootTest(classes = {ZqErpApplication.class}, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
public class TesatAsyncMessage {
|
|
|
@Autowired
|
AsyncMessageManager asyncMessageManager;
|
|
@Test
|
public void test() throws IOException {
|
|
Map<String, Object> param =new HashMap<>();
|
param.put("test","123");
|
asyncMessageManager.sendMsg("testkey",param);
|
asyncMessageManager.sendMsg("testkey","test=%s","123456");
|
|
|
}
|
|
|
|
}
|