if(getDefinition().getExtendedType() == null || !getDefinition().getExtendedType().equals(SmartContractType.FOLLOWER1.name())) getDefinition().setExtendedType(SmartContractType.FOLLOWER1.name());
assertTrue(followerContract.isOk()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.get("definition.extended_type")); assertEquals(200 * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(),
assertTrue(followerContract.isOk()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.get("definition.extended_type")); assertEquals(250 * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(),
assertTrue(followerContract.isOk()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.get("definition.extended_type")); assertEquals(200 * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(),
assertTrue(followerContract.isOk()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.get("definition.extended_type")); assertEquals(200 * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(), 1, 200, stepaPrivateKeys, false); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract2.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract2.get("definition.extended_type")); assertEquals(200 * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(),
assertTrue(followerContract.isOk()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.get("definition.extended_type")); assertEquals(200 * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(), 1, 200, stepaPrivateKeys, false); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), newRevFollowerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), newRevFollowerContract.get("definition.extended_type")); assertEquals(400 * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(), 1, 500, stepaPrivateKeys, false); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), newRevFollowerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), newRevFollowerContract.get("definition.extended_type")); assertEquals(900 * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(),
assertTrue(followerContract.isOk()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.get("definition.extended_type"));
assertTrue(followerContract.isOk()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.get("definition.extended_type")); assertEquals(200 * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(), assertTrue(refilledFollowerContract.isOk()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), refilledFollowerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), refilledFollowerContract.get("definition.extended_type")); assertEquals((200 + 300) * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(),
assertTrue(followerContract.isOk()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.get("definition.extended_type")); assertEquals(200 * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(), 1, 200, stepaPrivateKeys, false); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), newRevFollowerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), newRevFollowerContract.get("definition.extended_type")); assertEquals(400 * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(),
assertTrue(followerContract.isOk()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.get("definition.extended_type")); assertEquals(200 * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(), assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), refilledFollowerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), refilledFollowerContract.get("definition.extended_type")); assertEquals((200 + 300) * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(),
assertTrue(followerContract.isOk()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), followerContract.get("definition.extended_type")); assertEquals(200 * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(), assertTrue(refilledFollowerContract.isOk()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), refilledFollowerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), refilledFollowerContract.get("definition.extended_type")); assertEquals((200 + 300) * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(), assertTrue(refilledFollowerContract2.isOk()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), refilledFollowerContract2.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), refilledFollowerContract2.get("definition.extended_type")); assertEquals((200 + 300 + 300) * config.getServiceRate(NSmartContract.SmartContractType.FOLLOWER1.name()).doubleValue(),
followerContract.setApiLevel(3); Contract.Definition cd = followerContract.getDefinition(); cd.setExpiresAt(followerContract.getCreatedAt().plusMonths(60));
assertTrue(newRevFollowerContract.isOk()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), newRevFollowerContract.getDefinition().getExtendedType()); assertEquals(NSmartContract.SmartContractType.FOLLOWER1.name(), newRevFollowerContract.get("definition.extended_type"));