审查视图

src/test/java/com/sy/CommandInfoTest.java 984 字节
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
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);
    }
}