CommandInfoTest.java
984 字节
package com.sy;
import com.sy.model.GatherInfo;
import com.sy.socket.CommandClient;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.math.BigDecimal;
@RunWith(SpringRunner.class)
@SpringBootTest
@Slf4j
public class CommandInfoTest {
@Test
public void makeX21Test(){
GatherInfo gatherInfo = new GatherInfo();
gatherInfo.setSeqno("111");
gatherInfo.setSeqn("222");
gatherInfo.setIetype("E");
gatherInfo.setChnlno("4604333311");
gatherInfo.setAreaid("4604000000");
gatherInfo.setGrosswt(new BigDecimal("5033"));
gatherInfo.setVename("豫A61CR7");
gatherInfo.setBarcode("abc01");
gatherInfo.setCarecno("RFID61CR7");
gatherInfo.setContareco("1");
CommandClient.gatherInfoBuildAndSend(gatherInfo);
}
}