添加航班最后通知时间的单元测试

This commit is contained in:
zhouxiunai
2019-01-09 16:22:33 +08:00
parent 2c490580da
commit 4b27731803
@@ -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.LACLHandler;
import com.gzzn.omms.msgexchangeapi.service.exchange.IExchangeService;
import com.gzzn.omms.msgexchangeapi.utils.JsonUtil;
@RunWith(SpringRunner.class)
@SpringBootTest
public class LACLHandlerTest {
@Autowired
private CminmsgDao cminmsgDao;
@Autowired
private IExchangeService exchangeService;
@Test
public void testRun()
{
Cminmsg cminmsg = cminmsgDao.findOne(99370L);
CminmsgWapper cminmsgWapper = new CminmsgWapper(cminmsg);
cminmsgWapper.setMsg(exchangeService.xmlToMsg(cminmsg.getCminmsgsClobMsg()));
LACLHandler laclhandler = new LACLHandler();
HandlerResult result = laclhandler.run(cminmsgWapper);
System.out.println(JsonUtil.getString(result));
}
}