use of org.estatio.dom.lease.Lease in project estatio by estatio.
the class ApiIntegrationTest method t04_putLeaseWorks.
@Test
public void t04_putLeaseWorks() throws Exception {
api.putLease("APILEASE", "Lease", "APITENANT", "APILANDLORD", "APILEASETYPE", START_DATE, dt(2021, 12, 31), null, null, "APIP");
Lease lease = leases.findLeaseByReference("APILEASE");
Assert.assertNotNull(lease);
Assert.assertThat(lease.getRoles().size(), Is.is(2));
}
use of org.estatio.dom.lease.Lease in project estatio by estatio.
the class ApiIntegrationTest method t05_putLeaseUnitWorks.
@Test
public void t05_putLeaseUnitWorks() throws Exception {
api.putOccupancy("APILEASE", "APIUNIT", START_DATE, null, null, null, "APISIZE", "ABIBRAND", "APISECTOR", "APIACTIVITY", "YES", "YES", "YES");
Lease l = leases.findLeaseByReference("APILEASE");
Unit u = units.findUnitByReference("APIUNIT");
Assert.assertNotNull(leaseUnits.findByLeaseAndUnitAndStartDate(l, u, START_DATE));
Assert.assertNotNull(leaseUnits.findByLeaseAndUnitAndStartDate(l, u, START_DATE));
}
use of org.estatio.dom.lease.Lease in project estatio by estatio.
the class ApiIntegrationTest method t07_putLeaseTermWorks.
@Test
public void t07_putLeaseTermWorks() throws Exception {
api.putLeaseTermForIndexableRent("APILEASE", "APITENANT", "APIUNIT", BigInteger.valueOf(1), LeaseItemType.RENT.name(), START_DATE, BigInteger.valueOf(1), START_DATE, dt(2012, 12, 31), LeaseTermStatus.NEW.name(), null, null, BigDecimal.valueOf(12345), BigDecimal.valueOf(12345), null, null, null, "APIINDEX", LeaseTermFrequency.YEARLY.name(), null, null, null, null, null, null, null, null, null);
api.putLeaseTermForIndexableRent("APILEASE", "APITENANT", "APIUNIT", BigInteger.valueOf(1), LeaseItemType.RENT.name(), START_DATE, BigInteger.valueOf(2), dt(2013, 1, 1), dt(2013, 12, 31), LeaseTermStatus.NEW.name(), null, null, BigDecimal.valueOf(12345), BigDecimal.valueOf(12345), null, null, null, "APIINDEX", LeaseTermFrequency.YEARLY.name(), null, null, null, null, null, null, null, null, null);
Lease lease = leases.findLeaseByReference("APILEASE");
Assert.assertThat(lease.getItems().first().getTerms().size(), Is.is(2));
}
use of org.estatio.dom.lease.Lease in project estatio by estatio.
the class ApiIntegrationTest method t05b_putLeasePostalAddress.
@Test
public void t05b_putLeasePostalAddress() throws Exception {
api.putLeasePostalAddress("APITENANT", LeaseConstants.AgreementRoleType.TENANT.getTitle(), "APILEASE", "Address1", "Address2", null, "PostalCode", "City", "NH", "NLD", BigInteger.valueOf(1));
final Lease l = leases.findLeaseByReference("APILEASE");
final AgreementRoleType artTenant = agreementRoleTypes.findByTitle(LeaseConstants.AgreementRoleType.TENANT.getTitle());
final AgreementRole ar = l.findRoleWithType(artTenant, clockService.now());
Assert.assertThat(ar.getCommunicationChannels().size(), Is.is(1));
}
use of org.estatio.dom.lease.Lease in project estatio by estatio.
the class ApiIntegrationTest method t05b_putLeasePostalAddress_idempotent.
@Test
public void t05b_putLeasePostalAddress_idempotent() throws Exception {
api.putLeasePostalAddress("APITENANT", LeaseConstants.AgreementRoleType.TENANT.getTitle(), "APILEASE", "Address1", "Address2", null, "PostalCode", "City", "NH", "NLD", BigInteger.valueOf(1));
final Lease l = leases.findLeaseByReference("APILEASE");
final AgreementRoleType artTenant = agreementRoleTypes.findByTitle(LeaseConstants.AgreementRoleType.TENANT.getTitle());
final AgreementRole ar = l.findRoleWithType(artTenant, clockService.now());
Assert.assertThat(ar.getCommunicationChannels().size(), Is.is(1));
}
Aggregations