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


Java DataDictionaryTypeServiceBase类代码示例

本文整理汇总了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);
	
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:37,代码来源:KIMServiceLocatorInternalTest.java


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