use of io.lumeer.api.model.ServiceLimits in project engine by Lumeer.
the class OrganizationServiceIT method testPaymentsAssessments.
@Test
public void testPaymentsAssessments() {
paymentGatewayFacade.setDryRun(true);
createOrganization(CODE1);
createOrganization(CODE2);
Payment payment = new Payment(null, new Date(), 1770, "1234", Date.from(ZonedDateTime.ofLocal(LocalDateTime.of(2018, 4, 1, 12, 0), ZoneId.systemDefault(), null).toInstant()), Date.from(ZonedDateTime.ofLocal(LocalDateTime.of(2019, 4, 1, 12, 0), ZoneId.systemDefault(), null).toInstant()), Payment.PaymentState.CREATED, Payment.ServiceLevel.BASIC, 10, "cz", "CZK", "");
payment = createPayment(CODE1, payment);
ServiceLimits serviceLimits = getServiceLimits(CODE1);
assertThat(serviceLimits.getServiceLevel()).isEqualTo(Payment.ServiceLevel.FREE);
// todo call updateService once we know the message format
}
use of io.lumeer.api.model.ServiceLimits in project engine by Lumeer.
the class PaymentFacadeIT method testNoPayment.
@Test
public void testNoPayment() {
final ServiceLimits limits = paymentFacade.getServiceLimitsAt(organization, new Date());
assertThat(limits.getServiceLevel()).as("With no payments paid, we should have the FREE tier.").isEqualTo(Payment.ServiceLevel.FREE);
}
Aggregations