Search in sources :

Example 1 with FixedAssetRoleRepository

use of org.estatio.module.asset.dom.role.FixedAssetRoleRepository in project estatio by estatio.

the class FixedAssetRoleRepository_Test method setup.

@Before
public void setup() {
    asset = new FixedAssetForTesting();
    party = new PartyForTesting();
    type = FixedAssetRoleTypeEnum.ASSET_MANAGER;
    startDate = new LocalDate(2013, 1, 4);
    endDate = new LocalDate(2013, 2, 5);
    fixedAssetRoleRepository = new FixedAssetRoleRepository() {

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

        @Override
        protected List<FixedAssetRole> 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;
        }
    };
}
Also used : List(java.util.List) FixedAssetRoleRepository(org.estatio.module.asset.dom.role.FixedAssetRoleRepository) PartyForTesting(org.estatio.module.party.dom.PartyForTesting) LocalDate(org.joda.time.LocalDate) FinderInteraction(org.incode.module.unittestsupport.dom.repo.FinderInteraction) Before(org.junit.Before)

Aggregations

List (java.util.List)1 FixedAssetRoleRepository (org.estatio.module.asset.dom.role.FixedAssetRoleRepository)1 PartyForTesting (org.estatio.module.party.dom.PartyForTesting)1 FinderInteraction (org.incode.module.unittestsupport.dom.repo.FinderInteraction)1 LocalDate (org.joda.time.LocalDate)1 Before (org.junit.Before)1