添加上下轮档及撤销上下轮档事件。子系统增加omms

This commit is contained in:
zhouxiunai
2019-01-09 15:24:31 +08:00
parent 9574c87c3d
commit 4d8f31200b
3 changed files with 81 additions and 19 deletions
@@ -0,0 +1,38 @@
package com.gzzn.omms.msgexchangeapi.msghandler;
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 com.gzzn.omms.msgexchangeapi.dao.CminmsgDao;
import com.gzzn.omms.msgexchangeapi.entity.Cminmsg;
import com.gzzn.omms.msgexchangeapi.entity.CminmsgWapper;
import com.gzzn.omms.msgexchangeapi.msghandler.flop.CHOTHandler;
import com.gzzn.omms.msgexchangeapi.service.exchange.IExchangeService;
import com.gzzn.omms.msgexchangeapi.utils.JsonUtil;
@RunWith(SpringRunner.class)
@SpringBootTest
public class CHOTHandlerTest {
@Autowired
private CminmsgDao cminmsgDao;
@Autowired
private IExchangeService exchangeService;
@Test
public void testRun()
{
Cminmsg cminmsg = cminmsgDao.findOne(99381L);
CminmsgWapper cminmsgWapper = new CminmsgWapper(cminmsg);
cminmsgWapper.setMsg(exchangeService.xmlToMsg(cminmsg.getCminmsgsClobMsg()));
CHOTHandler chothandler = new CHOTHandler();
HandlerResult result = chothandler.run(cminmsgWapper);
System.out.println(JsonUtil.getString(result));
}
}