use of io.vertx.core.json.JsonObject in project vert.x by eclipse.
the class TestVerticle method start.
@Override
public void start() throws Exception {
processArgs = context.processArgs();
conf = context.config();
// if (Thread.currentThread().getContextClassLoader() != getClass().getClassLoader()) {
// throw new IllegalStateException("Wrong tccl!");
// }
vertx.eventBus().send("testcounts", new JsonObject().put("deploymentID", context.deploymentID()).put("count", instanceCount.incrementAndGet()));
}
use of io.vertx.core.json.JsonObject in project nem2-sdk-java by nemtech.
the class TransactionMappingTest method shouldCreateStandaloneLockFundsTransaction.
@Test
void shouldCreateStandaloneLockFundsTransaction() throws Exception {
JsonObject lockFundsTransactionDTO = new JsonObject("{\"meta\": {\"height\": [22115,0],\"hash\": \"796602E7AA17E1BECD6A0302AD18CC4AE9CB8B2C5DF4EE602C80F0A98120238D\",\"merkleComponentHash\": \"796602E7AA17E1BECD6A0302AD18CC4AE9CB8B2C5DF4EE602C80F0A98120238D\",\"index\": 0,\"id\": \"5A86F7FF5F8AE10001776B6C\"},\"transaction\": {\"signature\": \"298C9BB956C318431FD7BE912480DE57B0A997820A8F85DA824A5A0B81B63E8A58AB31936B371A6B500E0CBDE59C00A56B62F127EAA3E2BE3DF6F5C27FD3BD07\",\"signer\": \"1026D70E1954775749C6811084D6450A3184D977383F0E4282CD47118AF37755\",\"version\": 36867,\"type\": 16716,\"fee\": [0,0],\"deadline\": [3498561481,13],\"duration\": [100,0],\"mosaicId\": [3646934825,3576016193],\"amount\": [10000000,0],\"hash\": \"49E9F58867FB9399F32316B99CCBC301A5790E5E0605E25F127D28CEF99740A3\"}}");
Transaction lockFundsTransaction = new TransactionMapping().apply(lockFundsTransactionDTO);
validateStandaloneTransaction(lockFundsTransaction, lockFundsTransactionDTO);
}
use of io.vertx.core.json.JsonObject in project nem2-sdk-java by nemtech.
the class TransactionMappingTest method shouldCreateStandaloneRootNamespaceCreationTransaction.
@Test
void shouldCreateStandaloneRootNamespaceCreationTransaction() throws Exception {
JsonObject namespaceCreationTransactionDTO = new JsonObject("{\"meta\":{\"hash\":\"18C036C20B32348D63684E09A13128A2C18F6A75650D3A5FB43853D716E5E219\",\"height\":[1,0],\"id\":\"59FDA0733F17CF0001772CA7\",\"index\":19,\"merkleComponentHash\":\"18C036C20B32348D63684E09A13128A2C18F6A75650D3A5FB43853D716E5E219\"},\"transaction\":{\"deadline\":[1,0],\"duration\":[1000,0],\"fee\":[0,0],\"name\":\"a2p1mg\",\"namespaceId\":[437145074,4152736179],\"namespaceType\":0,\"signature\":\"553E696EB4A54E43A11D180EBA57E4B89D0048C9DD2604A9E0608120018B9E02F6EE63025FEEBCED3293B622AF8581334D0BDAB7541A9E7411E7EE4EF0BC5D0E\",\"signer\":\"B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF\",\"type\":16718,\"version\":36867}}");
Transaction namespaceCreationTransaction = new TransactionMapping().apply(namespaceCreationTransactionDTO);
validateStandaloneTransaction(namespaceCreationTransaction, namespaceCreationTransactionDTO);
}
use of io.vertx.core.json.JsonObject in project nem2-sdk-java by nemtech.
the class TransactionMappingTest method shouldCreateStandaloneSubNamespaceCreationTransaction.
@Test
void shouldCreateStandaloneSubNamespaceCreationTransaction() throws Exception {
JsonObject namespaceCreationTransactionDTO = new JsonObject("{\"meta\":{\"hash\":\"18C036C20B32348D63684E09A13128A2C18F6A75650D3A5FB43853D716E5E219\",\"height\":[1,0],\"id\":\"59FDA0733F17CF0001772CA7\",\"index\":19,\"merkleComponentHash\":\"18C036C20B32348D63684E09A13128A2C18F6A75650D3A5FB43853D716E5E219\"},\"transaction\":{\"deadline\":[1,0],\"fee\":[0,0],\"name\":\"0unius\",\"namespaceId\":[1970060410,3289875941],\"namespaceType\":1,\"parentId\":[3316183705,3829351378],\"signature\":\"553E696EB4A54E43A11D180EBA57E4B89D0048C9DD2604A9E0608120018B9E02F6EE63025FEEBCED3293B622AF8581334D0BDAB7541A9E7411E7EE4EF0BC5D0E\",\"signer\":\"B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF\",\"type\":16718,\"version\":36867}}");
Transaction namespaceCreationTransaction = new TransactionMapping().apply(namespaceCreationTransactionDTO);
validateStandaloneTransaction(namespaceCreationTransaction, namespaceCreationTransactionDTO);
}
use of io.vertx.core.json.JsonObject in project nem2-sdk-java by nemtech.
the class TransactionMappingTest method shouldCreateAggregateMosaicSupplyChangeTransaction.
@Test
void shouldCreateAggregateMosaicSupplyChangeTransaction() throws Exception {
JsonObject aggregateMosaicSupplyChangeTransactionDTO = new JsonObject("{\"meta\":{\"hash\":\"671653C94E2254F2A23EFEDB15D67C38332AED1FBD24B063C0A8E675582B6A96\",\"height\":[18160,0],\"id\":\"5A0069D83F17CF0001777E55\",\"index\":0,\"merkleComponentHash\":\"81E5E7AE49998802DABC816EC10158D3A7879702FF29084C2C992CD1289877A7\"},\"transaction\":{\"cosignatures\":[{\"signature\":\"5780C8DF9D46BA2BCF029DCC5D3BF55FE1CB5BE7ABCF30387C4637DDEDFC2152703CA0AD95F21BB9B942F3CC52FCFC2064C7B84CF60D1A9E69195F1943156C07\",\"signer\":\"A5F82EC8EBB341427B6785C8111906CD0DF18838FB11B51CE0E18B5E79DFF630\"}],\"deadline\":[3266625578,11],\"fee\":[0,0],\"signature\":\"939673209A13FF82397578D22CC96EB8516A6760C894D9B7535E3A1E068007B9255CFA9A914C97142A7AE18533E381C846B69D2AE0D60D1DC8A55AD120E2B606\",\"signer\":\"7681ED5023141D9CDCF184E5A7B60B7D466739918ED5DA30F7E71EA7B86EFF2D\",\"transactions\":[{\"meta\":{\"aggregateHash\":\"3D28C804EDD07D5A728E5C5FFEC01AB07AFA5766AE6997B38526D36015A4D006\",\"aggregateId\":\"5A0069D83F17CF0001777E55\",\"height\":[18160,0],\"id\":\"5A0069D83F17CF0001777E56\",\"index\":0},\"transaction\":{\"delta\":[100000,0],\"direction\":1,\"mosaicId\":[3070467832,2688515262],\"signer\":\"B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF\",\"type\":16973,\"version\":36867}}],\"type\":16705,\"version\":36867}}");
Transaction aggregateMosaicSupplyChangeTransaction = new TransactionMapping().apply(aggregateMosaicSupplyChangeTransactionDTO);
validateAggregateTransaction((AggregateTransaction) aggregateMosaicSupplyChangeTransaction, aggregateMosaicSupplyChangeTransactionDTO);
}
Aggregations