add test: TcpTransport

This commit is contained in:
free will
2021-05-10 16:25:01 +08:00
parent cfcd4cbe35
commit d141ca0e92
@@ -48,6 +48,18 @@ public class TcpTransportTest {
Arrays.toString(new SelfEncodingBase().selfWireEncode(lpPacket).getRaw()));
}
/**
* 测试结果:
* send: [-15, 0, -6, 25, -52, 4, 4, 5, 6, 7, -15, 0, -5, 15, -15, 0, -4, 1, 1, -15, 0, -3, 1, 1, -15, 0, -2, 1, 0]
* receive: [-15, 0, -6, 25, -52, 4, 4, 5, 6, 7, -15, 0, -5, 15, -15, 0, -4, 1, 1, -15, 0, -3, 1, 1, -15, 0, -2, 1, 0]
* @throws IOException
* @throws LogicFaceException
* @throws EncoderException
* @throws BlockException
* @throws MgmtException
* @throws ComponentException
* @throws PacketException
*/
@Test
public void testReceive() throws IOException, LogicFaceException, EncoderException, BlockException, MgmtException, ComponentException, PacketException {
// 初始化一个tcp连接