Search in sources :

Example 56 with Lease

use of org.estatio.module.lease.dom.Lease in project estatio by estatio.

the class InvoiceServiceMenu_Test method test.

@Test
public void test() {
    // given
    InvoiceServiceMenu invoiceService = new InvoiceServiceMenu();
    Lease lease = new Lease();
    // when
    assertThat(lease.getProperty()).isNull();
    // then
    assertThat(invoiceService.doDisableCalculate(lease)).isEqualTo("Please set occupancy first");
}
Also used : Lease(org.estatio.module.lease.dom.Lease) Test(org.junit.Test)

Example 57 with Lease

use of org.estatio.module.lease.dom.Lease in project estatio by estatio.

the class InvoiceItemForLeaseDtoFactory_Test method setUp.

@Before
public void setUp() throws Exception {
    // given
    ChargeGroup chargeGroup = new ChargeGroup();
    chargeGroup.setReference("CG");
    Charge charge = new Charge();
    charge.setReference("CH");
    charge.setExternalReference("CHE");
    charge.setGroup(chargeGroup);
    Tax tax = new Tax();
    Unit unit = new Unit();
    unit.setReference("UN");
    Brand brand = new Brand();
    brand.setName("BRAND");
    Occupancy occupancy = new Occupancy();
    occupancy.setEndDate(new LocalDate(2013, 12, 31));
    occupancy.setUnit(unit);
    occupancy.setBrand(brand);
    Lease lease = new Lease();
    lease.getOccupancies().add(occupancy);
    InvoiceForLease invoice = new InvoiceForLease();
    invoice.setLease(lease);
    invoiceItem = new InvoiceItemForLease();
    invoiceItem.setInvoice(invoice);
    invoiceItem.setCharge(charge);
    invoiceItem.setTax(tax);
}
Also used : Brand(org.estatio.module.lease.dom.occupancy.tags.Brand) Lease(org.estatio.module.lease.dom.Lease) InvoiceForLease(org.estatio.module.lease.dom.invoicing.InvoiceForLease) InvoiceItemForLease(org.estatio.module.lease.dom.invoicing.InvoiceItemForLease) InvoiceForLease(org.estatio.module.lease.dom.invoicing.InvoiceForLease) ChargeGroup(org.estatio.module.charge.dom.ChargeGroup) Occupancy(org.estatio.module.lease.dom.occupancy.Occupancy) Charge(org.estatio.module.charge.dom.Charge) InvoiceItemForLease(org.estatio.module.lease.dom.invoicing.InvoiceItemForLease) Tax(org.estatio.module.tax.dom.Tax) Unit(org.estatio.module.asset.dom.Unit) LocalDate(org.joda.time.LocalDate) Before(org.junit.Before)

Aggregations

Lease (org.estatio.module.lease.dom.Lease)57 LocalDate (org.joda.time.LocalDate)17 Programmatic (org.apache.isis.applib.annotation.Programmatic)16 ApplicationException (org.apache.isis.applib.ApplicationException)11 Charge (org.estatio.module.charge.dom.Charge)11 Test (org.junit.Test)11 LeaseItem (org.estatio.module.lease.dom.LeaseItem)10 Occupancy (org.estatio.module.lease.dom.occupancy.Occupancy)10 Unit (org.estatio.module.asset.dom.Unit)9 InvoiceForLease (org.estatio.module.lease.dom.invoicing.InvoiceForLease)9 Property (org.estatio.module.asset.dom.Property)7 Party (org.estatio.module.party.dom.Party)6 Action (org.apache.isis.applib.annotation.Action)5 ApplicationTenancy (org.isisaddons.module.security.dom.tenancy.ApplicationTenancy)5 Before (org.junit.Before)5 ArrayList (java.util.ArrayList)4 List (java.util.List)4 PaymentMethod (org.estatio.module.invoice.dom.PaymentMethod)4 InvoiceItemForLease (org.estatio.module.lease.dom.invoicing.InvoiceItemForLease)4 BigDecimal (java.math.BigDecimal)3