1 15 package hivemind.test; 16 17 import org.apache.hivemind.definition.ModuleDefinition; 18 import org.apache.hivemind.definition.impl.ModuleDefinitionImpl; 19 20 25 public class TestDependency extends FrameworkTestCase 26 { 27 28 public void testMissingRequiredModule() throws Exception 29 { 30 ModuleDefinitionImpl dependingModule = createModuleDefinition( 31 "dependency.declaring.module"); 32 33 dependingModule.addDependency("required.module"); 34 35 interceptLogging(); 36 37 buildFrameworkRegistry(new ModuleDefinition[] {dependingModule}); 38 39 assertLoggedMessage("Required module required.module does not exist."); 40 } 41 42 public void testDependency() throws Exception 43 { 44 ModuleDefinitionImpl dependingModule = createModuleDefinition( 45 "dependency.declaring.module"); 46 47 ModuleDefinition requiredModule = createModuleDefinition("required.module"); 48 49 dependingModule.addDependency(requiredModule.getId()); 50 51 buildFrameworkRegistry(new ModuleDefinition[] {dependingModule, requiredModule}); 52 } 53 54 } | Popular Tags |