@Test public void testResolve_CustomCommands() throws Exception { List<CustomCommandDefinition> commands = new ArrayList<CustomCommandDefinition>(); CustomCommandDefinition command1 = new CustomCommandDefinition(); setPrivateField(command1, "name", "one"); CustomCommandDefinition command2 = new CustomCommandDefinition(); setPrivateField(command2, "name", "two"); commands.add(command1); commands.add(command2); ComponentInfo info = new ComponentInfo(); ComponentInfo parentInfo = new ComponentInfo(); parentInfo.setCustomCommands(commands); assertEquals(commands, resolveComponent(info, parentInfo).getModuleInfo().getCustomCommands()); info.setCustomCommands(commands); parentInfo.setCustomCommands(null); assertEquals(commands, resolveComponent(info, parentInfo).getModuleInfo().getCustomCommands()); List<CustomCommandDefinition> commands2 = new ArrayList<CustomCommandDefinition>(); CustomCommandDefinition command3 = new CustomCommandDefinition(); setPrivateField(command3, "name", "two"); CustomCommandDefinition command4 = new CustomCommandDefinition(); setPrivateField(command4, "name", "four"); commands2.add(command3); commands2.add(command4); info.setCustomCommands(commands2); parentInfo.setCustomCommands(commands); List<CustomCommandDefinition> resolvedCommands = resolveComponent(info, parentInfo).getModuleInfo().getCustomCommands(); assertEquals(3, resolvedCommands.size()); assertTrue(resolvedCommands.contains(command1)); assertTrue(resolvedCommands.contains(command3)); assertTrue(resolvedCommands.contains(command4)); }
@Override public ComponentInfo getModuleInfo() { return componentInfo; }
ComponentModule extends BaseModule<ComponentModule, ComponentInfo> implements Validable { @Override public ComponentInfo getModuleInfo() { return componentInfo; } }
ComponentModule extends BaseModule<ComponentModule, ComponentInfo> implements Validable { @Override public ComponentInfo getModuleInfo() { return componentInfo; } ComponentModule(ComponentInfo componentInfo); }
ComponentModule extends BaseModule<ComponentModule, ComponentInfo> implements Validable { @Override public ComponentInfo getModuleInfo() { return componentInfo; } ComponentModule(ComponentInfo componentInfo); @Override void resolve(ComponentModule parent, Map<String, StackModule> allStacks,
	    Map<String, ServiceModule> commonServices, Map<String, ExtensionModule> extensions); @Override ComponentInfo getModuleInfo(); @Override boolean isDeleted(); @Override String getId(); @Override boolean isValid(); @Override void setValid(boolean valid); @Override void addError(String error); @Override Collection<String> getErrors(); @Override void addErrors(Collection<String> errors); @Override String toString(); }
ComponentModule extends BaseModule<ComponentModule, ComponentInfo> implements Validable { @Override public ComponentInfo getModuleInfo() { return componentInfo; } ComponentModule(ComponentInfo componentInfo); @Override void resolve(ComponentModule parent, Map<String, StackModule> allStacks,
	    Map<String, ServiceModule> commonServices, Map<String, ExtensionModule> extensions); @Override ComponentInfo getModuleInfo(); @Override boolean isDeleted(); @Override String getId(); @Override boolean isValid(); @Override void setValid(boolean valid); @Override void addError(String error); @Override Collection<String> getErrors(); @Override void addErrors(Collection<String> errors); @Override String toString();  }