本文整理汇总了Java中org.apache.isis.applib.fixturescripts.FixtureScript类的典型用法代码示例。如果您正苦于以下问题:Java FixtureScript类的具体用法?Java FixtureScript怎么用?Java FixtureScript使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FixtureScript类属于org.apache.isis.applib.fixturescripts包,在下文中一共展示了FixtureScript类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: runFixtureScript
import org.apache.isis.applib.fixturescripts.FixtureScript; //导入依赖的package包/类
@Action(
restrictTo = RestrictTo.PROTOTYPING
)
@ActionLayout(
cssClassFa="fa fa-bolt"
)
@MemberOrder(sequence = "499.10.1")
@Override
public List<FixtureResult> runFixtureScript(
final FixtureScript fixtureScript,
@ParameterLayout(
named="Parameters",
describedAs = "Script-specific parameters (key=value) ",
multiLine = 10)
@Parameter(optionality = Optionality.OPTIONAL)
final String parameters) {
return super.runFixtureScript(fixtureScript, parameters);
}
示例2: whenAlreadyExists
import org.apache.isis.applib.fixturescripts.FixtureScript; //导入依赖的package包/类
@Test
public void whenAlreadyExists() throws Exception {
// given
FixtureScript fs = new EmployeeTearDown();
fixtureScripts.runFixtureScript(fs, null);
transactionService.nextTransaction();
wrap(menu).create("Faz", "123", null);
transactionService.nextTransaction();
// then
expectedExceptions.expectCause(causalChainContains(SQLIntegrityConstraintViolationException.class));
// when
wrap(menu).create("Faz", "123", null);
transactionService.nextTransaction();
}
示例3: whenAlreadyExists
import org.apache.isis.applib.fixturescripts.FixtureScript; //导入依赖的package包/类
@Test
public void whenAlreadyExists() throws Exception {
// given
FixtureScript fs = new SimpleObjectsTearDown();
fixtureScripts.runFixtureScript(fs, null);
transactionService.nextTransaction();
wrap(menu).create("Faz");
transactionService.nextTransaction();
// then
expectedExceptions.expectCause(causalChainContains(SQLIntegrityConstraintViolationException.class));
// when
wrap(menu).create("Faz");
transactionService.nextTransaction();
}
示例4: execute
import org.apache.isis.applib.fixturescripts.FixtureScript; //导入依赖的package包/类
protected void execute(FixtureScript.ExecutionContext ec) {
final JdbcClient client = JdbcClient.withDatabase(database, userName, password);
for (Class cls : this.classes) {
LOG.info("Start import {}", cls);
List rowObjects = client.fromResultSet(cls);
Object previousRow = null;
Object rowObj;
for (Iterator iterator = rowObjects.iterator(); iterator.hasNext(); previousRow = rowObj) {
rowObj = iterator.next();
this.create(rowObj, ec, previousRow);
transactionService.nextTransaction();
}
}
LOG.info("Finished import");
}
示例5: whenAlreadyExists
import org.apache.isis.applib.fixturescripts.FixtureScript; //导入依赖的package包/类
@Test
public void whenAlreadyExists() throws Exception {
// given
FixtureScript fs = new QuickObjectsTearDown();
fixtureScripts.runFixtureScript(fs, null);
nextTransaction();
wrap(quickObjectMenu).create("Faz");
nextTransaction();
// then
expectedExceptions.expectCause(causalChainContains(SQLIntegrityConstraintViolationException.class));
// when
wrap(quickObjectMenu).create("Faz");
nextTransaction();
}
示例6: whenAlreadyExists
import org.apache.isis.applib.fixturescripts.FixtureScript; //导入依赖的package包/类
@Test
public void whenAlreadyExists() throws Exception {
// given
FixtureScript fs = new SimpleObjectsTearDown();
fixtureScripts.runFixtureScript(fs, null);
nextTransaction();
wrap(simpleObjects).create("Faz");
nextTransaction();
// then
expectedExceptions.expectCause(causalChainContains(SQLIntegrityConstraintViolationException.class));
// when
wrap(simpleObjects).create("Faz");
nextTransaction();
}
示例7: setupData
import org.apache.isis.applib.fixturescripts.FixtureScript; //导入依赖的package包/类
@Before
public void setupData() {
runFixtureScript(new FixtureScript() {
@Override
protected void execute(FixtureScript.ExecutionContext executionContext) {
executionContext.executeChild(this, Person_enum.DylanOfficeAdministratorGb.builder()); // gb mailroom
executionContext.executeChild(this, Person_enum.JonathanPropertyManagerGb.builder()); // gb property mgr for OXF
executionContext.executeChild(this, Person_enum.FaithConwayGb.builder()); // gb (no role)
executionContext.executeChild(this, Person_enum.OscarCountryDirectorGb.builder()); // gb country director
executionContext.executeChild(this, Person_enum.EmmaTreasurerGb.builder()); // gb treasurer
executionContext.executeChild(this, Person_enum.ThibaultOfficerAdministratorFr.builder()); // fr mailroom
executionContext.executeChild(this, Person_enum.FifineLacroixFr.builder()); // fr property mgr for VIV and MNS
executionContext.executeChild(this, Person_enum.OlivePropertyManagerFr.builder()); // fr property mgr for MAC
executionContext.executeChild(this, Person_enum.RosaireEvrardFr.builder()); // fr (no role)
executionContext.executeChild(this, Person_enum.GabrielHerveFr.builder()); // fr country director
executionContext.executeChild(this, Person_enum.BrunoTreasurerFr.builder()); // fr treasurer
}
});
}
示例8: setupData
import org.apache.isis.applib.fixturescripts.FixtureScript; //导入依赖的package包/类
@Before
public void setupData() {
runFixtureScript(new FixtureScript() {
@Override
protected void execute(ExecutionContext executionContext) {
executionContext.executeChild(this, Lease_enum.KalPoison001Nl.builder());
executionContext.executeChild(this, LeaseItemForRent_enum.KalPoison001Nl.builder());
executionContext.executeChild(this, InvoiceForLease_enum.KalPoison001Nl.builder());
executionContext.executeChild(this, LeaseItemForRent_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForServiceCharge_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForServiceCharge_enum.OxfTopModel001Gb_TA.builder());
executionContext.executeChild(this, LeaseItemForServiceChargeBudgeted_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForTurnoverRent_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForDiscount_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForEntryFee_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForTax_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForDeposit_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForMarketing_enum.OxfTopModel001Gb.builder());
}
});
}
示例9: setupData
import org.apache.isis.applib.fixturescripts.FixtureScript; //导入依赖的package包/类
@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);
}
示例10: when_exact_match
import org.apache.isis.applib.fixturescripts.FixtureScript; //导入依赖的package包/类
@Test
public void when_exact_match() throws Exception {
// given
FixtureScript fs = new DemoCustomer_and_DemoInvoiceWithAtPath_and_fragments_create();
fixtureScripts.runFixtureScript(fs, null);
transactionService.nextTransaction();
// when
final DocFragmentData data = DocFragmentData.Customer_hello_FRA;
final DocFragment docFragment = repository
.findByObjectTypeAndNameAndApplicableToAtPath(
data.getObjectType(), data.getName(), data.getAtPath());
// then
assertThat(docFragment.getObjectType()).isEqualTo(data.getObjectType());
assertThat(docFragment.getName()).isEqualTo(data.getName());
assertThat(docFragment.getAtPath()).isEqualTo(data.getAtPath());
}
示例11: createRetroInvoicesForLease
import org.apache.isis.applib.fixturescripts.FixtureScript; //导入依赖的package包/类
@Action(
restrictTo = RestrictTo.PROTOTYPING
)
@ActionLayout(
cssClassFa = "fa-bolt"
)
@MemberOrder(sequence = "3")
public List<FixtureResult> createRetroInvoicesForLease(
final Lease lease,
@ParameterLayout(
named = "Start due date"
)
final LocalDate startDueDate,
@ParameterLayout(
named = "Nextdue date"
)
final LocalDate nextDueDate) {
final CreateRetroInvoices creator = container.newTransientInstance(CreateRetroInvoices.class);
final FixtureScript.ExecutionContext executionContext = fixtureScripts.newExecutionContext(null);
creator.createLease(lease, startDueDate, nextDueDate, executionContext);
return executionContext.getResults();
}
示例12: setupData
import org.apache.isis.applib.fixturescripts.FixtureScript; //导入依赖的package包/类
@Before
public void setupData() {
runFixtureScript(new FixtureScript() {
@Override
protected void execute(ExecutionContext executionContext) {
executionContext.executeChild(this, LeaseItemForRent_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForServiceCharge_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForServiceCharge_enum.OxfTopModel001Gb_TA.builder());
executionContext.executeChild(this, LeaseItemForServiceChargeBudgeted_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForTurnoverRent_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForDiscount_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForEntryFee_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForTax_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForDeposit_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForMarketing_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, Lease_enum.OxfPoison003Gb.builder());
}
});
}
示例13: setupData
import org.apache.isis.applib.fixturescripts.FixtureScript; //导入依赖的package包/类
@Before
public void setupData() {
runFixtureScript(new FixtureScript() {
@Override
protected void execute(final ExecutionContext executionContext) {
executionContext.executeChild(this, OrganisationAndComms_enum.TopModelGb.builder());
executionContext.executeChild(this, OrganisationAndComms_enum.HelloWorldGb.builder());
executionContext.executeChild(this, PropertyAndUnitsAndOwnerAndManager_enum.OxfGb.builder());
executionContext.executeChild(this, BankAccount_enum.HelloWorldNl.builder());
executionContext.executeChild(this, BankAccountFaFa_enum.HelloWorldNl.builder());
executionContext.executeChild(this, new DocumentTypesAndTemplatesForCapexFixture());
executionContext.executeChild(this, IncomingPdf_enum.FakeOrder1.builder());
executionContext.executeChild(this, IncomingPdf_enum.FakeInvoice1.builder());
}
});
}
示例14: when_no_match
import org.apache.isis.applib.fixturescripts.FixtureScript; //导入依赖的package包/类
@Test
public void when_no_match() throws Exception {
// given
FixtureScript fs = new DemoCustomer_and_DemoInvoiceWithAtPath_and_fragments_create();
fixtureScripts.runFixtureScript(fs, null);
transactionService.nextTransaction();
// when
final DocFragmentData data = DocFragmentData.Customer_goodbye_GLOBAL;
final DocFragment docFragment = repository
.findByObjectTypeAndNameAndAtPath(
data.getObjectType(), data.getName(), "/ITA");
// then
assertThat(docFragment).isNull();
}
示例15: setupData
import org.apache.isis.applib.fixturescripts.FixtureScript; //导入依赖的package包/类
@Before
public void setupData() {
runFixtureScript(new FixtureScript() {
@Override
protected void execute(ExecutionContext executionContext) {
executionContext.executeChild(this, LeaseItemForRent_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForServiceCharge_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForServiceCharge_enum.OxfTopModel001Gb_TA.builder());
executionContext.executeChild(this, LeaseItemForServiceChargeBudgeted_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForTurnoverRent_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForDiscount_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForEntryFee_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForTax_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForDeposit_enum.OxfTopModel001Gb.builder());
executionContext.executeChild(this, LeaseItemForMarketing_enum.OxfTopModel001Gb.builder());
}
});
}