Search in sources :

Example 16 with FixtureScript

use of org.apache.isis.applib.fixturescripts.FixtureScript in project estatio by estatio.

the class BudgetCalculationResultRepository_IntegTest method setupData.

@Before
public void setupData() {
    runFixtureScript(new FixtureScript() {

        @Override
        protected void execute(final ExecutionContext executionContext) {
            executionContext.executeChild(this, Budget_enum.OxfBudget2015.builder());
            executionContext.executeChild(this, Budget_enum.OxfBudget2016.builder());
            executionContext.executeChild(this, Lease_enum.OxfTopModel001Gb.builder());
        }
    });
    propertyOxf = Property_enum.OxfGb.findUsing(serviceRegistry);
    budgetsForOxf = budgetRepository.findByProperty(propertyOxf);
    budget2015 = budgetRepository.findByPropertyAndStartDate(propertyOxf, Budget_enum.OxfBudget2015.getStartDate());
    leaseTopModel = Lease_enum.OxfTopModel001Gb.findUsing(serviceRegistry);
    run = wrap(budgetCalculationRunRepository).findOrCreateNewBudgetCalculationRun(leaseTopModel, budget2015, BudgetCalculationType.BUDGETED);
}
Also used : FixtureScript(org.apache.isis.applib.fixturescripts.FixtureScript) Before(org.junit.Before)

Example 17 with FixtureScript

use of org.apache.isis.applib.fixturescripts.FixtureScript in project estatio by estatio.

the class InvoiceCalculationService_normalRun_IntegTest method setupData.

// @BeforeClass
// public static void setupData() {
@Before
public void setupData() {
    runFixtureScript(new FixtureScript() {

        @Override
        protected void execute(ExecutionContext ec) {
            ec.executeChildren(this, Person_enum.LinusTorvaldsNl, PropertyAndUnitsAndOwnerAndManager_enum.OxfGb, PropertyAndUnitsAndOwnerAndManager_enum.KalNl, LeaseItemForRent_enum.OxfMediaX002Gb, LeaseItemForServiceCharge_enum.OxfMediaX002Gb, LeaseItemForTurnoverRent_enum.OxfMediaX002Gb, LeaseItemForRent_enum.OxfPoison003Gb, LeaseItemForServiceCharge_enum.OxfPoison003Gb, LeaseItemForTurnoverRent_enum.OxfPoison003Gb, LeaseItemForRent_enum.OxfTopModel001Gb, LeaseItemForServiceCharge_enum.OxfTopModel001Gb, LeaseItemForServiceCharge_enum.OxfTopModel001Gb_TA, LeaseItemForServiceChargeBudgeted_enum.OxfTopModel001Gb, LeaseItemForTurnoverRent_enum.OxfTopModel001Gb, LeaseItemForDiscount_enum.OxfTopModel001Gb, LeaseItemForEntryFee_enum.OxfTopModel001Gb, LeaseItemForTax_enum.OxfTopModel001Gb, LeaseItemForDeposit_enum.OxfTopModel001Gb, LeaseItemForMarketing_enum.OxfTopModel001Gb, BreakOption_enum.OxfPoison003Gb_FIXED, BreakOption_enum.OxfPoison003Gb_ROLLING, BreakOption_enum.OxfPoison003Gb_FIXED, BreakOption_enum.OxfPoison003Gb_ROLLING, BreakOption_enum.OxfTopModel001Gb_FIXED, BreakOption_enum.OxfTopModel001Gb_ROLLING, LeaseItemForRent_enum.KalPoison001Nl, Lease_enum.OxfPret004Gb, LeaseItemForRent_enum.OxfMiracl005Gb, LeaseItemForServiceCharge_enum.OxfMiracl005Gb, LeaseItemForTurnoverRent_enum.OxfMiracl005Gb, LeaseItemForDiscount_enum.OxfMiracle005bGb, LeaseItemForDeposit_enum.OxfMiracle005bGb);
        }
    });
    lease = Lease_enum.OxfTopModel001Gb.findUsing(serviceRegistry);
    assertThat(lease.getItems().size()).isEqualTo(9);
    leaseTopModelRentItem = lease.findItem(LeaseItemType.RENT, VT.ld(2010, 7, 15), VT.bi(1));
    leaseTopModelServiceChargeItem = lease.findItem(LeaseItemType.SERVICE_CHARGE, VT.ld(2010, 7, 15), VT.bi(1));
    assertThat(leaseTopModelRentItem).isNotNull();
    assertThat(leaseTopModelServiceChargeItem).isNotNull();
}
Also used : FixtureScript(org.apache.isis.applib.fixturescripts.FixtureScript) Before(org.junit.Before)

Example 18 with FixtureScript

use of org.apache.isis.applib.fixturescripts.FixtureScript in project estatio by estatio.

the class AgreementTypeRepository_IntegTest method setupData.

@Before
public void setupData() {
    runFixtureScript(new FixtureScript() {

        @Override
        protected void execute(ExecutionContext executionContext) {
            // 5 oxford leases, 1 kal
            executionContext.executeChild(this, Lease_enum.OxfTopModel001Gb.builder());
            executionContext.executeChild(this, Lease_enum.OxfMediaX002Gb.builder());
            executionContext.executeChild(this, Lease_enum.OxfPoison003Gb.builder());
            executionContext.executeChild(this, Lease_enum.OxfPret004Gb.builder());
            executionContext.executeChild(this, Lease_enum.OxfMiracl005Gb.builder());
            executionContext.executeChild(this, Lease_enum.KalPoison001Nl.builder());
        }
    });
    lease = Lease_enum.OxfTopModel001Gb.findUsing(serviceRegistry);
}
Also used : FixtureScript(org.apache.isis.applib.fixturescripts.FixtureScript) Before(org.junit.Before)

Aggregations

FixtureScript (org.apache.isis.applib.fixturescripts.FixtureScript)18 Before (org.junit.Before)16 DocumentTypesAndTemplatesForCapexFixture (org.estatio.module.capex.seed.DocumentTypesAndTemplatesForCapexFixture)4 CapexChargeHierarchyXlsxFixture (org.estatio.module.charge.fixtures.incoming.builders.CapexChargeHierarchyXlsxFixture)3 TickingClockFixture (org.apache.isis.applib.fixturescripts.clock.TickingClockFixture)1 Blob (org.apache.isis.applib.value.Blob)1 PersonAndRolesBuilder (org.estatio.module.asset.fixtures.person.builders.PersonAndRolesBuilder)1 EstatioRolesAndPermissions (org.estatio.module.base.fixtures.security.perms.personas.EstatioRolesAndPermissions)1 EstatioAdmin_Has_EstatioSuperuserRole (org.estatio.module.base.fixtures.security.userrole.personas.EstatioAdmin_Has_EstatioSuperuserRole)1 EstatioAdmin (org.estatio.module.base.fixtures.security.users.personas.EstatioAdmin)1 EstatioUser (org.estatio.module.base.fixtures.security.users.personas.EstatioUser)1 EstatioUserInFrance (org.estatio.module.base.fixtures.security.users.personas.EstatioUserInFrance)1 EstatioUserInGreatBritain (org.estatio.module.base.fixtures.security.users.personas.EstatioUserInGreatBritain)1 EstatioUserInItaly (org.estatio.module.base.fixtures.security.users.personas.EstatioUserInItaly)1 EstatioUserInNetherlands (org.estatio.module.base.fixtures.security.users.personas.EstatioUserInNetherlands)1 EstatioUserInSweden (org.estatio.module.base.fixtures.security.users.personas.EstatioUserInSweden)1 Person (org.estatio.module.party.dom.Person)1 ApplicationTenancy_enum (org.incode.module.apptenancy.fixtures.enums.ApplicationTenancy_enum)1 Document (org.incode.module.document.dom.impl.docs.Document)1 LocalDate (org.joda.time.LocalDate)1