assertEquals(NSmartContract.SmartContractType.SLOT1.name(), slotContract.get("definition.extended_type")); assertEquals(100 * config.getServiceRate(NSmartContract.SmartContractType.SLOT1.name()).doubleValue(), slotContract.getPrepaidKilobytesDays().doubleValue(), 0.01); assertEquals(NSmartContract.SmartContractType.SLOT1.name(), slotContract2.get("definition.extended_type")); assertEquals(100 * config.getServiceRate(NSmartContract.SmartContractType.SLOT1.name()).doubleValue(), slotContract2.getPrepaidKilobytesDays().doubleValue(), 0.01);
assertEquals(NSmartContract.SmartContractType.SLOT1.name(), slotContract.get("definition.extended_type")); assertEquals(100 * config.getServiceRate(NSmartContract.SmartContractType.SLOT1.name()).doubleValue(), slotContract.getPrepaidKilobytesDays().doubleValue(), 0.01); System.out.println(">> " + slotContract.getPrepaidKilobytesDays().doubleValue() + " KD");
assertEquals(NSmartContract.SmartContractType.SLOT1.name(), slotContract.get("definition.extended_type")); assertEquals(100 * config.getServiceRate(NSmartContract.SmartContractType.SLOT1.name()).doubleValue(), slotContract.getPrepaidKilobytesDays().doubleValue(), 0.01); assertEquals(NSmartContract.SmartContractType.SLOT1.name(), refilledSlotContract.get("definition.extended_type")); assertEquals((100 + 300) * config.getServiceRate(NSmartContract.SmartContractType.SLOT1.name()).doubleValue(), refilledSlotContract.getPrepaidKilobytesDays().doubleValue(), 0.01); assertEquals(NSmartContract.SmartContractType.SLOT1.name(), refilledSlotContract2.get("definition.extended_type")); assertEquals((100 + 300 + 300) * config.getServiceRate(NSmartContract.SmartContractType.SLOT1.name()).doubleValue(), refilledSlotContract2.getPrepaidKilobytesDays().doubleValue(), 0.01);
assertEquals(NSmartContract.SmartContractType.SLOT1.name(), slotContract.get("definition.extended_type")); assertEquals(100 * config.getServiceRate(NSmartContract.SmartContractType.SLOT1.name()).doubleValue(), slotContract.getPrepaidKilobytesDays().doubleValue(), 0.01); System.out.println(">> " + slotContract.getPrepaidKilobytesDays().doubleValue() + " KD"); assertEquals(NSmartContract.SmartContractType.SLOT1.name(), refilledSlotContract.get("definition.extended_type")); assertEquals((100 + 300) * config.getServiceRate(NSmartContract.SmartContractType.SLOT1.name()).doubleValue(), refilledSlotContract.getPrepaidKilobytesDays().doubleValue(), 0.01); System.out.println(">> " + refilledSlotContract.getPrepaidKilobytesDays().doubleValue() + " KD"); assertEquals(NSmartContract.SmartContractType.SLOT1.name(), refilledSlotContract2.get("definition.extended_type")); assertEquals((100 + 300 + 300) * config.getServiceRate(NSmartContract.SmartContractType.SLOT1.name()).doubleValue(), refilledSlotContract2.getPrepaidKilobytesDays().doubleValue(), 0.01); System.out.println(">> " + refilledSlotContract2.getPrepaidKilobytesDays().doubleValue() + " KD"); assertEquals(NSmartContract.SmartContractType.SLOT1.name(), refilledSlotContract3.get("definition.extended_type")); assertEquals((100 + 300 + 300 + 300) * config.getServiceRate(NSmartContract.SmartContractType.SLOT1.name()).doubleValue(), refilledSlotContract3.getPrepaidKilobytesDays().doubleValue(), 0.01); System.out.println(">> " + refilledSlotContract3.getPrepaidKilobytesDays().doubleValue() + " KD");