use of org.apache.isis.applib.fixturescripts.FixtureScript in project estatio by estatio.
the class LeaseModuleIntegTestAbstract method bootstrapAndSetupIfRequired.
@Override
public void bootstrapAndSetupIfRequired() {
super.bootstrapAndSetupIfRequired();
// TODO: push down to subclasses that need this... at the moment this fixture is hidden away and not obvious
runFixtureScript(new FixtureScript() {
@Override
protected void execute(final ExecutionContext ec) {
ec.executeChildren(this, // demo
DocFragment_demo_enum.InvoicePreliminaryLetterDescription_DemoGbr, DocFragment_demo_enum.InvoicePreliminaryLetterDescription_DemoNld, DocFragment_demo_enum.InvoiceDescription_DemoGbr, DocFragment_demo_enum.InvoiceDescription_DemoNld, DocFragment_demo_enum.InvoiceItemDescription_DemoGbr, DocFragment_demo_enum.InvoiceItemDescription_DemoNld);
}
});
}
use of org.apache.isis.applib.fixturescripts.FixtureScript in project estatio by estatio.
the class AgreementRepository_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);
}
use of org.apache.isis.applib.fixturescripts.FixtureScript in project estatio by estatio.
the class EstatioBaseModule method getRefDataSetupFixture.
@Override
public FixtureScript getRefDataSetupFixture() {
if (refData.get()) {
return null;
}
// else
refData.set(true);
return new FixtureScript() {
@Override
protected void execute(final ExecutionContext executionContext) {
executionContext.executeChild(this, new TickingClockFixture().setDate("2014-05-18"));
executionContext.executeChild(this, new ApplicationTenancy_enum.PersistAll());
// set up 3 estatio roles
executionContext.executeChild(this, new EstatioRolesAndPermissions());
// estatio-admin user with the estatio-admin role + superuser
executionContext.executeChild(this, new EstatioAdmin());
executionContext.executeChild(this, new EstatioAdmin_Has_EstatioSuperuserRole());
// bunch of users with estatio-user role
executionContext.executeChild(this, new EstatioUser());
executionContext.executeChild(this, new EstatioUserInFrance());
executionContext.executeChild(this, new EstatioUserInGreatBritain());
executionContext.executeChild(this, new EstatioUserInItaly());
executionContext.executeChild(this, new EstatioUserInNetherlands());
executionContext.executeChild(this, new EstatioUserInSweden());
}
};
}
use of org.apache.isis.applib.fixturescripts.FixtureScript in project estatio by estatio.
the class BudgetCalculationResultLinkRepository_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);
budget2015 = budgetRepository.findByPropertyAndStartDate(propertyOxf, Budget_enum.OxfBudget2015.getStartDate());
charge = Charge_enum.GbServiceCharge.findUsing(serviceRegistry);
leaseTopModel = Lease_enum.OxfTopModel001Gb.findUsing(serviceRegistry);
run = budgetCalculationRunRepository.createBudgetCalculationRun(leaseTopModel, budget2015, BudgetCalculationType.BUDGETED, Status.NEW);
leaseItem = leaseTopModel.newItem(LeaseItemType.SERVICE_CHARGE_BUDGETED, LeaseAgreementRoleTypeEnum.LANDLORD, charge, InvoicingFrequency.MONTHLY_IN_ADVANCE, PaymentMethod.DIRECT_DEBIT, leaseTopModel.getStartDate());
}
use of org.apache.isis.applib.fixturescripts.FixtureScript in project estatio by estatio.
the class BudgetCalculationRunRepository_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());
}
Aggregations