Search in sources :

Example 1 with FixturesInstallingEvent

use of org.apache.isis.applib.events.system.FixturesInstallingEvent in project estatio by estatio.

the class AgreementRoleTypeRepository_Test method setup.

@Before
public void setup() {
    agreementType = new AgreementType();
    agreementRoleTypeRepository = new AgreementRoleTypeRepository() {

        @Override
        protected <T> T firstMatch(Query<T> query) {
            finderInteraction = new FinderInteraction(query, FinderMethod.FIRST_MATCH);
            return null;
        }

        @Override
        protected List<AgreementRoleType> allInstances() {
            finderInteraction = new FinderInteraction(null, FinderMethod.ALL_INSTANCES);
            return null;
        }

        @Override
        protected <T> List<T> allMatches(Query<T> query) {
            finderInteraction = new FinderInteraction(query, FinderMethod.ALL_MATCHES);
            return null;
        }
    };
    QueryResultsCache.Control control = new QueryResultsCache.Control();
    control.on(new FixturesInstallingEvent(new FixtureScriptsDefault()));
    final QueryResultsCache queryResultsCache = new QueryResultsCache() {

        {
            control = new Control();
        }
    };
    agreementRoleTypeRepository.queryResultsCache = queryResultsCache;
}
Also used : AgreementType(org.estatio.module.agreement.dom.type.AgreementType) FixturesInstallingEvent(org.apache.isis.applib.events.system.FixturesInstallingEvent) List(java.util.List) FixtureScriptsDefault(org.apache.isis.applib.services.fixturespec.FixtureScriptsDefault) QueryResultsCache(org.apache.isis.applib.services.queryresultscache.QueryResultsCache) FinderInteraction(org.incode.module.unittestsupport.dom.repo.FinderInteraction) Before(org.junit.Before)

Aggregations

List (java.util.List)1 FixturesInstallingEvent (org.apache.isis.applib.events.system.FixturesInstallingEvent)1 FixtureScriptsDefault (org.apache.isis.applib.services.fixturespec.FixtureScriptsDefault)1 QueryResultsCache (org.apache.isis.applib.services.queryresultscache.QueryResultsCache)1 AgreementType (org.estatio.module.agreement.dom.type.AgreementType)1 FinderInteraction (org.incode.module.unittestsupport.dom.repo.FinderInteraction)1 Before (org.junit.Before)1