当前位置: 首页>>代码示例>>Java>>正文


Java FixtureScript类代码示例

本文整理汇总了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);
}
 
开发者ID:isisaddons,项目名称:isis-app-kitchensink,代码行数:19,代码来源:KitchensinkFixturesService.java

示例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();
}
 
开发者ID:bibryam,项目名称:rotabuilder,代码行数:18,代码来源:EmployeeMenu_IntegTest.java

示例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();
}
 
开发者ID:Stephen-Cameron-Data-Services,项目名称:isis-agri,代码行数:18,代码来源:SimpleObjectMenu_IntegTest.java

示例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");

    }
 
开发者ID:incodehq,项目名称:ecpcrm,代码行数:21,代码来源:JdbcFixture.java

示例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();
}
 
开发者ID:isisaddons-legacy,项目名称:isis-app-quickstart,代码行数:18,代码来源:QuickObjectMenuIntegTest.java

示例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();
}
 
开发者ID:isisaddons,项目名称:isis-app-simpledsl,代码行数:18,代码来源:SimpleObjectsIntegTest.java

示例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
        }
    });
}
 
开发者ID:estatio,项目名称:estatio,代码行数:21,代码来源:PartyRoleRepository_IntegTest.java

示例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());

        }
    });
}
 
开发者ID:estatio,项目名称:estatio,代码行数:25,代码来源:LeaseItem_IntegTest.java

示例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);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:18,代码来源:BudgetCalculationResultRepository_IntegTest.java

示例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());
}
 
开发者ID:estatio,项目名称:estatio,代码行数:20,代码来源:DocFragmentRepository_IntegTest.java

示例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();
}
 
开发者ID:estatio,项目名称:estatio,代码行数:23,代码来源:EstatioFixtureScripts.java

示例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());
        }
    });
}
 
开发者ID:estatio,项目名称:estatio,代码行数:22,代码来源:LeaseItemRepository_IntegTest.java

示例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());
        }
    });
}
 
开发者ID:estatio,项目名称:estatio,代码行数:19,代码来源:IncomingDocumentRepository_IntegTest.java

示例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();
}
 
开发者ID:estatio,项目名称:estatio,代码行数:18,代码来源:DocFragmentRepository_IntegTest.java

示例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());

        }
    });
}
 
开发者ID:estatio,项目名称:estatio,代码行数:20,代码来源:Lease_IntegTest.java


注:本文中的org.apache.isis.applib.fixturescripts.FixtureScript类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。