本文整理汇总了Java中org.kuali.rice.kns.kim.type.DataDictionaryTypeServiceBase类的典型用法代码示例。如果您正苦于以下问题:Java DataDictionaryTypeServiceBase类的具体用法?Java DataDictionaryTypeServiceBase怎么用?Java DataDictionaryTypeServiceBase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DataDictionaryTypeServiceBase类属于org.kuali.rice.kns.kim.type包,在下文中一共展示了DataDictionaryTypeServiceBase类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testGetKimTypeService_KimType
import org.kuali.rice.kns.kim.type.DataDictionaryTypeServiceBase; //导入依赖的package包/类
@Test
public void testGetKimTypeService_KimType() {
// test by passing null
try {
KimTypeService typeService1 = KimFrameworkServiceLocator.getKimTypeService((KimType) null);
assertTrue("should have thrown exception and never got here", false);
} catch (IllegalArgumentException e) {
}
// test by passing a KimType with a null service name
KimType.Builder nullKimType = KimType.Builder.create();
nullKimType.setServiceName(null);
KimTypeService typeService2 = KimFrameworkServiceLocator.getKimTypeService(nullKimType.build());
assertNotNull("type service shoudl have been found", typeService2);
assertEquals("should be the default kim type", DataDictionaryTypeServiceBase.class, typeService2.getClass());
// test by passing a KimType with an empty service name
KimType.Builder emptyKimType = KimType.Builder.create();
nullKimType.setServiceName("");
KimTypeService typeService3 = KimFrameworkServiceLocator.getKimTypeService(emptyKimType.build());
assertNotNull("type service should have been found", typeService3);
assertEquals("should be the default kim type", DataDictionaryTypeServiceBase.class, typeService3.getClass());
// test by passing a KimType that refers to the Permission TypeService
KimType permissionKimType = KimApiServiceLocator.getKimTypeInfoService().findKimTypeByNameAndNamespace(
KimConstants.NAMESPACE_CODE, "Permission");
assertNotNull("The KR-IDM:Permission KimType should exist.", permissionKimType);
KimTypeService typeService4 = KimFrameworkServiceLocator.getKimTypeService(permissionKimType);
assertNotNull("type service should have been found", typeService4);
}