Search in sources :

Example 1 with PropertyRepository

use of org.estatio.module.asset.dom.PropertyRepository in project estatio by estatio.

the class PropertyMenu2_Test method setup.

@Before
public void setup() {
    propertyRepository = new PropertyRepository() {

        @Override
        protected <T> T uniqueMatch(Query<T> query) {
            finderInteraction = new FinderInteraction(query, FinderMethod.UNIQUE_MATCH);
            return (T) new Property();
        }

        @Override
        protected List<Property> 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;
        }
    };
    propertyMenu = new PropertyMenu();
    propertyMenu.propertyRepository = propertyRepository;
}
Also used : List(java.util.List) PropertyRepository(org.estatio.module.asset.dom.PropertyRepository) Property(org.estatio.module.asset.dom.Property) EstatioApplicationTenancyRepositoryForProperty(org.estatio.module.asset.dom.EstatioApplicationTenancyRepositoryForProperty) FinderInteraction(org.incode.module.unittestsupport.dom.repo.FinderInteraction) Before(org.junit.Before)

Aggregations

List (java.util.List)1 EstatioApplicationTenancyRepositoryForProperty (org.estatio.module.asset.dom.EstatioApplicationTenancyRepositoryForProperty)1 Property (org.estatio.module.asset.dom.Property)1 PropertyRepository (org.estatio.module.asset.dom.PropertyRepository)1 FinderInteraction (org.incode.module.unittestsupport.dom.repo.FinderInteraction)1 Before (org.junit.Before)1