use of org.junit.jupiter.api.DisplayName in project nem2-sdk-java by nemtech.
the class RegisterNamespaceTransactionTest method serializationSubNamespace.
@Test
@DisplayName("Serialization sub namespace")
void serializationSubNamespace() {
// Generated at nem2-library-js/test/transactions/RegisterNamespaceTransaction.spec.js
byte[] expected = new byte[] { (byte) 150, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, (byte) 144, 78, 65, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 126, (byte) 233, (byte) 179, (byte) 184, (byte) 175, (byte) 223, 83, 64, 3, 18, (byte) 152, 27, 120, 121, (byte) 163, 113, 12, 115, 117, 98, 110, 97, 109, 101, 115, 112, 97, 99, 101 };
RegisterNamespaceTransaction registerNamespaceTransaction = RegisterNamespaceTransaction.createSubNamespace(new FakeDeadline(), "subnamespace", new NamespaceId(new BigInteger("4635294387305441662")), NetworkType.MIJIN_TEST);
byte[] actual = registerNamespaceTransaction.generateBytes();
assertArrayEquals(expected, actual);
}
use of org.junit.jupiter.api.DisplayName in project nem2-sdk-java by nemtech.
the class TransferTransactionTest method serialization.
@Test
@DisplayName("Serialization")
void serialization() {
// Generated at nem2-library-js/test/transactions/TransferTransaction.spec.js
byte[] expected = new byte[] { (byte) 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, (byte) 144, 84, 65, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, (byte) 144, (byte) 232, (byte) 254, (byte) 189, (byte) 103, (byte) 29, (byte) 212, (byte) 27, (byte) 238, (byte) 148, (byte) 236, (byte) 59, (byte) 165, (byte) 131, (byte) 28, (byte) 182, (byte) 8, (byte) 163, (byte) 18, (byte) 194, (byte) 242, (byte) 3, (byte) 186, (byte) 132, (byte) 172, 1, 0, 1, 0, 103, 43, 0, 0, (byte) 206, 86, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0 };
TransferTransaction transferTransaction = TransferTransaction.create(new FakeDeadline(), new Address("SDUP5PLHDXKBX3UU5Q52LAY4WYEKGEWC6IB3VBFM", NetworkType.MIJIN_TEST), Arrays.asList(new Mosaic(new MosaicId(new BigInteger("95442763262823")), BigInteger.valueOf(100))), PlainMessage.Empty, NetworkType.MIJIN_TEST);
byte[] actual = transferTransaction.generateBytes();
assertArrayEquals(expected, actual);
}
use of org.junit.jupiter.api.DisplayName in project winery by eclipse.
the class YamlWriterTest method roundTripSingleTest.
@DisplayName("Test read and write single round trip")
@ParameterizedTest(name = "{index} name=''{0}''")
@ValueSource(strings = { "example_16-topology_templates-1_1" })
public void roundTripSingleTest(String file) throws Exception {
Path fileName = getYamlFile(file);
TServiceTemplate serviceTemplate = this.getYamlServiceTemplate(fileName);
writeYamlServiceTemplate(serviceTemplate, temporaryFolder.resolve(fileName));
TServiceTemplate out = this.getYamlServiceTemplate(fileName, temporaryFolder);
Assertions.assertEquals(serviceTemplate, out);
}
Aggregations