@Test public void testJmxRepositoryCompositeData() throws Exception { Features features = new Features(); features.setName("test-1.0.0"); features.getRepository().add("mvn:org.test/test-dependency/1.0.0/xml/features"); features.getFeature().add(new Feature("test-feature", "1.0.0")); URI uri = new URI("mvn:org.test/test/1.0.0/xml/features"); Repository repository = new RepositoryImpl(uri, features, true); JmxRepository jmxRepository = new JmxRepository(repository); CompositeData compositeData = jmxRepository.asCompositeData(); assertEquals("test-1.0.0", compositeData.get(REPOSITORY_NAME)); assertEquals(uri.toString(), compositeData.get(REPOSITORY_URI)); assertTrue((Boolean) compositeData.get(REPOSITORY_BLACKLISTED)); String[] repositoryUris = (String[]) compositeData.get(REPOSITORY_REPOSITORIES); assertEquals(1, repositoryUris.length); assertEquals("mvn:org.test/test-dependency/1.0.0/xml/features", repositoryUris[0]); TabularData repositoryFeatures = (TabularData) compositeData.get(REPOSITORY_FEATURES); assertEquals(1, repositoryFeatures.size()); assertNotNull(repositoryFeatures.get(new Object[] {"test-feature", "1.0.0"})); }
public CompositeData asCompositeData() { return data; }
JmxRepository { public CompositeData asCompositeData() { return data; } }
JmxRepository { public CompositeData asCompositeData() { return data; } JmxRepository(Repository repository); }
JmxRepository { public CompositeData asCompositeData() { return data; } JmxRepository(Repository repository); CompositeData asCompositeData(); static TabularData tableFrom(Collection<JmxRepository> repositories); }
JmxRepository { public CompositeData asCompositeData() { return data; } JmxRepository(Repository repository); CompositeData asCompositeData(); static TabularData tableFrom(Collection<JmxRepository> repositories); static final CompositeType REPOSITORY; static final TabularType REPOSITORY_TABLE; }