use of com.icodici.universa.contract.services.NContract in project universa by UniversaBlockchain.
the class NSmartContractTest method goodNSmartContractFromDSL.
@Test
public void goodNSmartContractFromDSL() throws Exception {
Contract smartContract = NSmartContract.fromDslFile(rootPath + "NotaryNSmartDSLTemplate.yml");
smartContract.addSignerKeyFromFile(rootPath + "_xer0yfe2nn1xthc.private.unikey");
smartContract.seal();
smartContract.check();
smartContract.traceErrors();
assertTrue(smartContract.isOk());
assertEquals(NSmartContract.SmartContractType.N_SMART_CONTRACT.name(), smartContract.getDefinition().getExtendedType());
assertEquals(NSmartContract.SmartContractType.N_SMART_CONTRACT.name(), smartContract.get("definition.extended_type"));
assertTrue(smartContract instanceof NSmartContract);
assertTrue(smartContract instanceof NContract);
}
Aggregations