@Test public void testGetVersionControl() throws Exception { AdapterRegistry myAdapterRegistry = (AdapterRegistry) AdapterRegistry .findInstance(new JunitBootstrapProperties(new Properties())); assertNull(myAdapterRegistry.getVersionControl()); AdapterBuilder builder = new ArrayList<AdapterBuilder>(myAdapterRegistry.builders()).get(0); builder.overrideRuntimeVCS(new MockRuntimeVersionControl()); assertEquals("MOCK", myAdapterRegistry.getVersionControl()); }
@Override public String getVersionControl() { String name = null; for (AdapterBuilder builder : builderByProps.values()) { name = builder.getVersionControl(); if (name != null) break; } return name; }
AdapterRegistry implements AdapterRegistryMBean { @Override public String getVersionControl() { String name = null; for (AdapterBuilder builder : builderByProps.values()) { name = builder.getVersionControl(); if (name != null) break; } return name; } }
AdapterRegistry implements AdapterRegistryMBean { @Override public String getVersionControl() { String name = null; for (AdapterBuilder builder : builderByProps.values()) { name = builder.getVersionControl(); if (name != null) break; } return name; } private  AdapterRegistry(); }
AdapterRegistry implements AdapterRegistryMBean { @Override public String getVersionControl() { String name = null; for (AdapterBuilder builder : builderByProps.values()) { name = builder.getVersionControl(); if (name != null) break; } return name; } private  AdapterRegistry(); static AdapterRegistryMBean findInstance(Properties cfg); @Override ObjectName createObjectName(); @Override void registerMBean(); @Override void unregisterMBean(); @Override Set<ObjectName> getAdapters(); @Override URLString getConfigurationURL(ObjectName adapterName); @Override String getConfigurationURLString(ObjectName adapterName); @Override boolean removeConfigurationURL(ObjectName adapterName); @Override void putConfigurationURL(ObjectName adapterName, URLString configUrl); @Override void putConfigurationURL(ObjectName adapterName, String configUrl); @Override void persistAdapter(AdapterManagerMBean adapter, URLString url); @Override void persistAdapter(AdapterManagerMBean adapter, String url); @Override void persistAdapter(ObjectName adapter, URLString url); @Override void persistAdapter(ObjectName adapter, String url); @Override void persist(String data, URLString configUrl); @Override ObjectName createAdapter(URLString url); @Override ObjectName createAdapterFromUrl(String url); @Override ObjectName createAdapter(String xml); @Override void addAdapter(AdapterManagerMBean adapterManager); @Override void destroyAdapter(AdapterManagerMBean adapter); @Override void destroyAdapter(ObjectName adapterName); static void sendShutdownEvent(Set<ObjectName> adapterManagers); static void start(Set<ObjectName> adapterManagers); static void close(Set<ObjectName> adapterManagers); static void stop(Set<ObjectName> adapterManagers); static void unregister(Set<ObjectName> adapterManagers); @Override Properties getConfiguration(); @Override String getVersionControl(); @Override void reloadFromVersionControl(); @Override Set<ObjectName> reloadFromConfig(); @Override ObjectName reloadFromConfig(ObjectName obj); @Override ObjectName reloadFromVersionControl(ObjectName obj); @Override void addConfiguration(Properties cfg); @Override void validateConfig(String config); @Override String getClassDefinition(String className); @Override Set<ObjectName> getBuilders(); @Override ObjectName getBuilder(ObjectName p); @Override AdapterBuilderMBean getBuilderMBean(ObjectName p); @Override AdapterBuilderMBean getBuilder(Properties p); void addManagementComponentInfo(ManagementComponentInfo componentInfo); @Override List<ManagementComponentInfo> getManagementComponentInfo(); void setManagementComponentInfo(List<ManagementComponentInfo> managementComponentInfo); }
AdapterRegistry implements AdapterRegistryMBean { @Override public String getVersionControl() { String name = null; for (AdapterBuilder builder : builderByProps.values()) { name = builder.getVersionControl(); if (name != null) break; } return name; } private  AdapterRegistry(); static AdapterRegistryMBean findInstance(Properties cfg); @Override ObjectName createObjectName(); @Override void registerMBean(); @Override void unregisterMBean(); @Override Set<ObjectName> getAdapters(); @Override URLString getConfigurationURL(ObjectName adapterName); @Override String getConfigurationURLString(ObjectName adapterName); @Override boolean removeConfigurationURL(ObjectName adapterName); @Override void putConfigurationURL(ObjectName adapterName, URLString configUrl); @Override void putConfigurationURL(ObjectName adapterName, String configUrl); @Override void persistAdapter(AdapterManagerMBean adapter, URLString url); @Override void persistAdapter(AdapterManagerMBean adapter, String url); @Override void persistAdapter(ObjectName adapter, URLString url); @Override void persistAdapter(ObjectName adapter, String url); @Override void persist(String data, URLString configUrl); @Override ObjectName createAdapter(URLString url); @Override ObjectName createAdapterFromUrl(String url); @Override ObjectName createAdapter(String xml); @Override void addAdapter(AdapterManagerMBean adapterManager); @Override void destroyAdapter(AdapterManagerMBean adapter); @Override void destroyAdapter(ObjectName adapterName); static void sendShutdownEvent(Set<ObjectName> adapterManagers); static void start(Set<ObjectName> adapterManagers); static void close(Set<ObjectName> adapterManagers); static void stop(Set<ObjectName> adapterManagers); static void unregister(Set<ObjectName> adapterManagers); @Override Properties getConfiguration(); @Override String getVersionControl(); @Override void reloadFromVersionControl(); @Override Set<ObjectName> reloadFromConfig(); @Override ObjectName reloadFromConfig(ObjectName obj); @Override ObjectName reloadFromVersionControl(ObjectName obj); @Override void addConfiguration(Properties cfg); @Override void validateConfig(String config); @Override String getClassDefinition(String className); @Override Set<ObjectName> getBuilders(); @Override ObjectName getBuilder(ObjectName p); @Override AdapterBuilderMBean getBuilderMBean(ObjectName p); @Override AdapterBuilderMBean getBuilder(Properties p); void addManagementComponentInfo(ManagementComponentInfo componentInfo); @Override List<ManagementComponentInfo> getManagementComponentInfo(); void setManagementComponentInfo(List<ManagementComponentInfo> managementComponentInfo);  }