@Test public void encode() { codec.encode(packet); assertThat((UnsignedLong) codec.getValueAt(0)).isEqualTo(UnsignedLong.ZERO); assertThat((Instant) codec.getValueAt(1)).isEqualTo(NOW); assertThat((InterledgerCondition) codec.getValueAt(2)) .isEqualTo(IldcpRequestPacket.EXECUTION_CONDITION); assertThat((InterledgerAddress) codec.getValueAt(3)).isEqualTo(IldcpRequestPacket.PEER_DOT_CONFIG); assertThat((byte[]) codec.getValueAt(4)).isEqualTo(new byte[0]); }
@Override public void encode(IldcpRequestPacket value) { setValueAt(0, value.getAmount()); setValueAt(1, value.getExpiresAt()); setValueAt(2, value.getExecutionCondition()); setValueAt(3, value.getDestination()); setValueAt(4, value.getData()); }
AsnIldcpRequestPacketDataCodec extends AsnSequenceCodec<IldcpRequestPacket> { @Override public void encode(IldcpRequestPacket value) { setValueAt(0, value.getAmount()); setValueAt(1, value.getExpiresAt()); setValueAt(2, value.getExecutionCondition()); setValueAt(3, value.getDestination()); setValueAt(4, value.getData()); } }
AsnIldcpRequestPacketDataCodec extends AsnSequenceCodec<IldcpRequestPacket> { @Override public void encode(IldcpRequestPacket value) { setValueAt(0, value.getAmount()); setValueAt(1, value.getExpiresAt()); setValueAt(2, value.getExecutionCondition()); setValueAt(3, value.getDestination()); setValueAt(4, value.getData()); } AsnIldcpRequestPacketDataCodec(); }
AsnIldcpRequestPacketDataCodec extends AsnSequenceCodec<IldcpRequestPacket> { @Override public void encode(IldcpRequestPacket value) { setValueAt(0, value.getAmount()); setValueAt(1, value.getExpiresAt()); setValueAt(2, value.getExecutionCondition()); setValueAt(3, value.getDestination()); setValueAt(4, value.getData()); } AsnIldcpRequestPacketDataCodec(); @Override IldcpRequestPacket decode(); @Override void encode(IldcpRequestPacket value); }
AsnIldcpRequestPacketDataCodec extends AsnSequenceCodec<IldcpRequestPacket> { @Override public void encode(IldcpRequestPacket value) { setValueAt(0, value.getAmount()); setValueAt(1, value.getExpiresAt()); setValueAt(2, value.getExecutionCondition()); setValueAt(3, value.getDestination()); setValueAt(4, value.getData()); } AsnIldcpRequestPacketDataCodec(); @Override IldcpRequestPacket decode(); @Override void encode(IldcpRequestPacket value);  }