use of io.nem.symbol.sdk.model.mosaic.MosaicFlags in project nem2-sdk-java by nemtech.
the class MosaicDefinitionTransactionTest method shouldGenerateEmbeddedBytes.
@Test
@DisplayName("SerializationEmbeddedBytes")
void shouldGenerateEmbeddedBytes() {
String expected = "460000000000000068b3fbb18729c1fde225c57f8ce080fa828f0067e451a3fd81fa628842b0b7630000000001904d4100000000000000000a00000000000000000000000203";
NetworkType networkType = NetworkType.MIJIN_TEST;
MosaicId mosaicId = new MosaicId(new BigInteger("0"));
BigInteger fee = BigInteger.ONE;
MosaicNonce mosaicNonce = MosaicNonce.createFromBigInteger(new BigInteger("0"));
MosaicFlags mosaicFlags = MosaicFlags.create(false, true, false);
PublicAccount signature = PublicAccount.createFromPublicKey("68b3fbb18729c1fde225c57f8ce080fa828f0067e451a3fd81fa628842b0b763", NetworkType.MIJIN_TEST);
TransactionInfo transactionInfo = TransactionInfo.createAggregate(new BigInteger("121855"), 1, "5A3D23889CD1E800015929A9", "3D28C804EDD07D5A728E5C5FFEC01AB07AFA5766AE6997B38526D36015A4D006", "5A0069D83F17CF0001777E55");
MosaicDefinitionTransaction transaction = MosaicDefinitionTransactionFactory.create(networkType, new Deadline(BigInteger.ONE), mosaicNonce, mosaicId, mosaicFlags, 3, new BlockDuration(10)).maxFee(fee).signature("theSigner").signer(signature).transactionInfo(transactionInfo).build();
assertEmbeddedSerialization(expected, transaction);
}
Aggregations