本文整理匯總了Java中org.ligoj.app.iam.ICompanyRepository類的典型用法代碼示例。如果您正苦於以下問題:Java ICompanyRepository類的具體用法?Java ICompanyRepository怎麽用?Java ICompanyRepository使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ICompanyRepository類屬於org.ligoj.app.iam包,在下文中一共展示了ICompanyRepository類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: prepareData
import org.ligoj.app.iam.ICompanyRepository; //導入依賴的package包/類
@Before
public void prepareData() throws IOException {
persistEntities("csv",
new Class[] { DelegateOrg.class, ContainerScope.class, CacheCompany.class, CacheUser.class, CacheGroup.class, CacheMembership.class },
StandardCharsets.UTF_8.name());
CacheManager.getInstance().getCache("container-scopes").removeAll();
iamProvider = Mockito.mock(IamProvider.class);
final IamConfiguration configuration = Mockito.mock(IamConfiguration.class);
Mockito.when(iamProvider.getConfiguration()).thenReturn(configuration);
userRepository = Mockito.mock(IUserRepository.class);
groupRepository = Mockito.mock(IGroupRepository.class);
companyRepository = Mockito.mock(ICompanyRepository.class);
Mockito.when(configuration.getUserRepository()).thenReturn(userRepository);
Mockito.when(configuration.getCompanyRepository()).thenReturn(companyRepository);
Mockito.when(configuration.getGroupRepository()).thenReturn(groupRepository);
}
示例2: prepareData
import org.ligoj.app.iam.ICompanyRepository; //導入依賴的package包/類
@Before
public void prepareData() throws IOException {
persistEntities("csv",
new Class[] { DelegateOrg.class, CacheCompany.class, CacheGroup.class, CacheUser.class, CacheMembership.class },
StandardCharsets.UTF_8.name());
iamProvider = Mockito.mock(IamProvider.class);
final IamConfiguration configuration = Mockito.mock(IamConfiguration.class);
Mockito.when(iamProvider.getConfiguration()).thenReturn(configuration);
userRepository = Mockito.mock(IUserRepository.class);
groupRepository = Mockito.mock(IGroupRepository.class);
companyRepository = Mockito.mock(ICompanyRepository.class);
Mockito.when(configuration.getUserRepository()).thenReturn(userRepository);
Mockito.when(configuration.getCompanyRepository()).thenReturn(companyRepository);
Mockito.when(configuration.getGroupRepository()).thenReturn(groupRepository);
resource = new UserOrgResource();
applicationContext.getAutowireCapableBeanFactory().autowireBean(resource);
resource.setIamProvider(new IamProvider[] { iamProvider });
Mockito.when(companyRepository.getTypeName()).thenReturn("company");
}
示例3: getRepository
import org.ligoj.app.iam.ICompanyRepository; //導入依賴的package包/類
@Override
public ICompanyRepository getRepository() {
return getCompany();
}
示例4: getCompany
import org.ligoj.app.iam.ICompanyRepository; //導入依賴的package包/類
/**
* Company repository provider.
*
* @return Company repository provider.
*/
protected ICompanyRepository getCompany() {
return iamProvider[0].getConfiguration().getCompanyRepository();
}