Search in sources :

Example 1 with EstatioApplicationTenancyRepositoryForCountry

use of org.estatio.module.countryapptenancy.dom.EstatioApplicationTenancyRepositoryForCountry 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)

Example 2 with EstatioApplicationTenancyRepositoryForCountry

use of org.estatio.module.countryapptenancy.dom.EstatioApplicationTenancyRepositoryForCountry in project estatio by estatio.

the class EstatioApplicationTenancyRepositoryForProperty_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));
        }
    });
    estatioApplicationTenancyRepositoryForProperty = new EstatioApplicationTenancyRepositoryForProperty();
    estatioApplicationTenancyRepositoryForCountry = new EstatioApplicationTenancyRepositoryForCountry();
    estatioApplicationTenancyRepositoryForProperty.applicationTenancies = mockApplicationTenancies;
    estatioApplicationTenancyRepositoryForProperty.estatioApplicationTenancyRepositoryForCountry = estatioApplicationTenancyRepositoryForCountry;
    estatioApplicationTenancyRepositoryForCountry.setApplicationTenancies(mockApplicationTenancies);
}
Also used : Expectations(org.jmock.Expectations) EstatioApplicationTenancyRepositoryForCountry(org.estatio.module.countryapptenancy.dom.EstatioApplicationTenancyRepositoryForCountry) Before(org.junit.Before)

Aggregations

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