优化航班延误的处理,添加航班延误增加航班异常信息功能

This commit is contained in:
zhouxiunai
2019-01-15 15:40:43 +08:00
parent 30a69b8cfa
commit 22f10ef7a2
5 changed files with 149 additions and 17 deletions
@@ -0,0 +1,38 @@
package com.gzzn.omms.msgexchangeapi.msghandler.flop;
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.HandlerResult;
import com.gzzn.omms.msgexchangeapi.service.exchange.IExchangeService;
import com.gzzn.omms.msgexchangeapi.utils.JsonUtil;
@RunWith(SpringRunner.class)
@SpringBootTest
public class DELYHandlerTest {
@Autowired
private CminmsgDao cminmsgDao;
@Autowired
private IExchangeService exchangeService;
@Test
public void testRun()
{
Cminmsg cminmsg = cminmsgDao.findOne(240451L);
CminmsgWapper cminmsgWapper = new CminmsgWapper(cminmsg);
cminmsgWapper.setMsg(exchangeService.xmlToMsg(cminmsg.getCminmsgsClobMsg()));
DELYHandler delyhandler = new DELYHandler();
HandlerResult result = delyhandler.run(cminmsgWapper);
System.out.println(JsonUtil.getString(result));
}
}