当前位置: 首页>>代码示例>>Java>>正文


Java ApplicationTenancy.setPath方法代码示例

本文整理汇总了Java中org.isisaddons.module.security.dom.tenancy.ApplicationTenancy.setPath方法的典型用法代码示例。如果您正苦于以下问题:Java ApplicationTenancy.setPath方法的具体用法?Java ApplicationTenancy.setPath怎么用?Java ApplicationTenancy.setPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.isisaddons.module.security.dom.tenancy.ApplicationTenancy的用法示例。


在下文中一共展示了ApplicationTenancy.setPath方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUp

import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
    numerator = new Numerator();
    numerator.setFormat("XXX-%05d");
    numerator.setLastIncrement(BigInteger.TEN);
    applicationTenancy = new ApplicationTenancy();
    applicationTenancy.setPath("/");

    context.checking(new Expectations() {
        {
            allowing(mockClockService).now();
            will(returnValue(LocalDate.now()));
        }
    });

}
 
开发者ID:estatio,项目名称:estatio,代码行数:17,代码来源:InvoiceForLease_Test.java

示例2: setup

import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
@Before
public void setup() {

    propertyBookmark = new Bookmark("PROP", "123");

    applicationTenancy = new ApplicationTenancy();
    applicationTenancy.setPath("/");

    context.checking(new Expectations() {
        {
            allowing(mockBookmarkService).bookmarkFor(mockProperty);
            will(returnValue(propertyBookmark));
        }
    });
    numeratorRepository = new NumeratorRepository() {

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

        @Override
        protected List<Numerator> 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;
        }
    };
    numeratorRepository.bookmarkService = mockBookmarkService;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:37,代码来源:NumeratorRepository_Test.java

示例3: testFindCountryTenancyFor

import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
@Test
public void testFindCountryTenancyFor() {

    // given
    ApplicationTenancy atGlobalLevel = new ApplicationTenancy();
    atGlobalLevel.setPath("/");
    ApplicationTenancy atGlobalLevel_ = new ApplicationTenancy();
    atGlobalLevel_.setPath("/_");

    ApplicationTenancy atCountryLevel = new ApplicationTenancy();
    atCountryLevel.setPath("/ABC");
    ApplicationTenancy atCountryLevel_ = new ApplicationTenancy();
    atCountryLevel_.setPath("/ABC/_");

    ApplicationTenancy atPropertyLevel = new ApplicationTenancy();
    atPropertyLevel.setPath("/ABC/DEF");
    atPropertyLevel.setParent(atCountryLevel);

    ApplicationTenancy atLandLordLevel = new ApplicationTenancy();
    atLandLordLevel.setPath("/ABC/DEF/GHI");
    atLandLordLevel.setParent(atPropertyLevel);

    // when, then
    assertThat(estatioApplicationTenancyRepository.findCountryTenancyFor(atGlobalLevel).getPath()).isEqualTo("/");
    assertThat(estatioApplicationTenancyRepository.findCountryTenancyFor(atGlobalLevel_).getPath()).isEqualTo("/_");
    assertThat(estatioApplicationTenancyRepository.findCountryTenancyFor(atCountryLevel).getPath()).isEqualTo("/ABC");
    assertThat(estatioApplicationTenancyRepository.findCountryTenancyFor(atCountryLevel_).getPath()).isEqualTo("/ABC/_");
    assertThat(estatioApplicationTenancyRepository.findCountryTenancyFor(atPropertyLevel).getPath()).isEqualTo("/ABC");
    assertThat(estatioApplicationTenancyRepository.findCountryTenancyFor(atLandLordLevel).getPath()).isEqualTo("/ABC");

}
 
开发者ID:estatio,项目名称:estatio,代码行数:32,代码来源:EstatioApplicationTenancyRepositoryForCountry_Test.java

示例4: setUp

import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
    format = "0%6d";
    lastIncrement = BigInteger.TEN;

    invoiceRepository = new InvoiceRepository();
    estatioNumeratorRepository = new NumeratorForCollectionRepository();
    estatioNumeratorRepository.numeratorRepository = mockNumeratorRepository;

    applicationTenancy = new ApplicationTenancy();
    applicationTenancy.setPath("/");
}
 
开发者ID:estatio,项目名称:estatio,代码行数:13,代码来源:NumeratorCollectionRepository_Test.java

示例5: setUp

import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
@Before
public void setUp() {
    name= "SOME_NAME";
    atPath = "/SOME/PATH";
    applicationTenancy = new ApplicationTenancy();
    applicationTenancy.setPath(atPath);
}
 
开发者ID:estatio,项目名称:estatio,代码行数:8,代码来源:BrandRepository_Test.java

示例6: tenancy

import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
private static ApplicationTenancy tenancy(final String path, final String name) {
    ApplicationTenancy applicationTenancy = new ApplicationTenancy();
    applicationTenancy.setPath(path);
    applicationTenancy.setName(name);
    return applicationTenancy;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:7,代码来源:EstatioApplicationTenancyRepository_Test.java

示例7: applicationTenancyOf

import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
static ApplicationTenancy applicationTenancyOf(final String path) {
    final ApplicationTenancy applicationTenancy = new ApplicationTenancy();
    applicationTenancy.setPath(path);
    return applicationTenancy;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:6,代码来源:ApplicationTenancyLevel_Test.java

示例8: newApplicationTenancy

import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
private ApplicationTenancy newApplicationTenancy(final String path) {
    ApplicationTenancy applicationTenancy = new ApplicationTenancy();
    applicationTenancy.setPath(path);
    return applicationTenancy;
}
 
开发者ID:estatio,项目名称:estatio,代码行数:6,代码来源:ChargeRepository_Test.java

示例9: happyCase

import org.isisaddons.module.security.dom.tenancy.ApplicationTenancy; //导入方法依赖的package包/类
@Test
public void happyCase() {

    // given
    applicationTenancy = new ApplicationTenancy();
    applicationTenancy.setPath("/FRA/PDH");

    final Property property = new Property() {
        @Override public ApplicationTenancy getApplicationTenancy() {
            return applicationTenancy;
        }
    };


    // when
    landLordFra = new Party() {
        @Override public ApplicationTenancy getApplicationTenancy() {
            ApplicationTenancy applicationTenancyParty = new ApplicationTenancy();
            applicationTenancyParty.setPath("/FRA");
            return applicationTenancyParty;
        }
    };
    tenantFra = new Party() {
        @Override public ApplicationTenancy getApplicationTenancy() {
            ApplicationTenancy applicationTenancyParty = new ApplicationTenancy();
            applicationTenancyParty.setPath("/FRA");
            return applicationTenancyParty;
        }
    };
    error = leaseMenu.validateNewLease(property, null, null, null, new LocalDate(2010, 01, 01), null, new LocalDate(2020, 01, 01), landLordFra, tenantFra);

    // then
    assertThat(error).isNull();

    // and when
    landLordIta = new Party() {
        @Override public ApplicationTenancy getApplicationTenancy() {
            ApplicationTenancy applicationTenancyParty = new ApplicationTenancy();
            applicationTenancyParty.setPath("/ITA");
            return applicationTenancyParty;
        }
    };
    error = leaseMenu.validateNewLease(property, null, null, null, new LocalDate(2010, 01, 01), null, new LocalDate(2020, 01, 01), landLordIta, tenantFra);

    // then
    assertThat(error).isEqualTo("Landlord not valid. (wrong application tenancy)");

    // and when
    tenantIta = new Party() {
        @Override public ApplicationTenancy getApplicationTenancy() {
            ApplicationTenancy applicationTenancyParty = new ApplicationTenancy();
            applicationTenancyParty.setPath("/ITA");
            return applicationTenancyParty;
        }
    };
    error = leaseMenu.validateNewLease(property, null, null, null, new LocalDate(2010, 01, 01), null, new LocalDate(2020, 01, 01), landLordFra, tenantIta);

    // then
    assertThat(error).isEqualTo("Tenant not valid. (wrong application tenancy)");

}
 
开发者ID:estatio,项目名称:estatio,代码行数:62,代码来源:LeaseMenu_Test.java


注:本文中的org.isisaddons.module.security.dom.tenancy.ApplicationTenancy.setPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。