Search in sources :

Example 1 with AgreementRole

use of org.estatio.dom.agreement.AgreementRole 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));
}
Also used : AgreementRole(org.estatio.dom.agreement.AgreementRole) Lease(org.estatio.dom.lease.Lease) AgreementRoleType(org.estatio.dom.agreement.AgreementRoleType) Test(org.junit.Test)

Example 2 with AgreementRole

use of org.estatio.dom.agreement.AgreementRole 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));
}
Also used : AgreementRole(org.estatio.dom.agreement.AgreementRole) Lease(org.estatio.dom.lease.Lease) AgreementRoleType(org.estatio.dom.agreement.AgreementRoleType) Test(org.junit.Test)

Aggregations

AgreementRole (org.estatio.dom.agreement.AgreementRole)2 AgreementRoleType (org.estatio.dom.agreement.AgreementRoleType)2 Lease (org.estatio.dom.lease.Lease)2 Test (org.junit.Test)2