Search in sources :

Example 1 with EstatioApplicationTenancyRepositoryForProperty

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

the class EstatioApplicationTenancyRepositoryForLease_Test method setUp.

@Before
public void setUp() throws Exception {
    context.checking(new Expectations() {

        {
            allowing(mockApplicationTenancies).allTenancies();
            will(returnValue(someTenancies()));
            allowing(mockApplicationTenancies).findByPath("/");
            will(returnValue(global));
            allowing(mockApplicationTenancies).findByPath("/GBR");
            will(returnValue(null));
            allowing(mockApplicationTenancies).findByPath("/ITA");
            will(returnValue(italy));
            allowing(mockApplicationTenancies).findByPath("/ITA/GRA");
            will(returnValue(grande));
            allowing(mockApplicationTenancies).findByPath("/ITA/GRA/_");
            will(returnValue(grandeDefault));
            allowing(mockApplicationTenancies).findByPath("/ITA/GRA/ta");
            will(returnValue(grandeTa));
        }
    });
    estatioApplicationTenancyRepositoryForLease = new EstatioApplicationTenancyRepositoryForLease();
    estatioApplicationTenancyRepositoryForProperty = new EstatioApplicationTenancyRepositoryForProperty();
    estatioApplicationTenancyRepositoryForCountry = new EstatioApplicationTenancyRepositoryForCountry();
    estatioApplicationTenancyRepositoryForLease.estatioApplicationTenancyRepositoryForProperty = estatioApplicationTenancyRepositoryForProperty;
    estatioApplicationTenancyRepositoryForProperty.setEstatioApplicationTenancyRepositoryForCountry(estatioApplicationTenancyRepositoryForCountry);
    estatioApplicationTenancyRepositoryForLease.applicationTenancies = mockApplicationTenancies;
    estatioApplicationTenancyRepositoryForProperty.setApplicationTenancies(mockApplicationTenancies);
    estatioApplicationTenancyRepositoryForCountry.setApplicationTenancies(mockApplicationTenancies);
}
Also used : Expectations(org.jmock.Expectations) EstatioApplicationTenancyRepositoryForProperty(org.estatio.module.asset.dom.EstatioApplicationTenancyRepositoryForProperty) EstatioApplicationTenancyRepositoryForCountry(org.estatio.module.countryapptenancy.dom.EstatioApplicationTenancyRepositoryForCountry) Before(org.junit.Before)

Aggregations

EstatioApplicationTenancyRepositoryForProperty (org.estatio.module.asset.dom.EstatioApplicationTenancyRepositoryForProperty)1 EstatioApplicationTenancyRepositoryForCountry (org.estatio.module.countryapptenancy.dom.EstatioApplicationTenancyRepositoryForCountry)1 Expectations (org.jmock.Expectations)1 Before (org.junit.Before)1