コード例 #1
0
  @Test
  public void testDummyOutgoingAck() {
    ch.writeInbound(Unpooled.wrappedBuffer(new byte[] {(byte) 0x81, (byte) 0xFF, 0x00}));

    UsnIncomingMessage msg = (UsnIncomingMessage) ch.readInbound();
    assertEquals(msg.getMessageType(), DUMMY_OUTGOING_ACK);
  }
コード例 #2
0
  @Test
  public void testDummyIncoming() {
    ch.writeInbound(Unpooled.wrappedBuffer(new byte[] {0x02, (byte) 0xFF, 0x01, 23}));

    UsnIncomingMessage msg = (UsnIncomingMessage) ch.readInbound();
    assertEquals(msg.getMessageType(), DUMMY_INCOMING);
  }