📄 simplesemanticsrepositorytest.java
字号:
package org.drools.smf;import org.drools.DroolsTestCase;public class SimpleSemanticsRepositoryTest extends DroolsTestCase{ public void testRegisterLookup() throws Exception { SimpleSemanticsRepository repo = new SimpleSemanticsRepository( ); try { repo.lookupSemanticModule( "http://cheese.org/" ); fail( "should have thrown NoSuchSemanticModuleException" ); } catch ( NoSuchSemanticModuleException e ) { // expected and correct assertEquals( "http://cheese.org/", e.getUri( ) ); assertEquals( "no such semantic module: http://cheese.org/", e.getMessage( ) ); } SimpleSemanticModule module = new SimpleSemanticModule( "http://cheese.org/" ); repo.registerSemanticModule( module ); assertSame( module, repo.lookupSemanticModule( "http://cheese.org/" ) ); SemanticModule[] modules = repo.getSemanticModules( ); assertEquals( "Not the correct number of modules. ", modules.length, 1 ); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -