Search in sources :

Example 1 with Describable

use of org.codice.ddf.platform.services.common.Describable in project ddf by codice.

the class TestMigratable method testGetOptionalMigratableInfo.

@Test
public void testGetOptionalMigratableInfo() {
    DescribableBean bean1 = new DescribableBean("1.0", "ddf.platform", "Platform Migratable", "Exports platform config", "Codice");
    DescribableBean bean2 = new DescribableBean("2.0", "ddf.catalog", "Catalog Migratable", "Exports catalog metacards", "Codice");
    List<ConfigurationMigratable> mockConfigs = mock(List.class);
    List<DataMigratable> migratables = new ArrayList<>();
    migratables.add(new TestMigratable(bean1, 3));
    migratables.add(new TestMigratable(bean2, 4));
    ConfigurationMigrationManager manager = new ConfigurationMigrationManager(configurationAdminMigration, mBeanServer, mockConfigs, migratables);
    Collection<Describable> describables = manager.getOptionalMigratableInfo();
    verifyDescriptionEqual((Describable) describables.toArray()[0], bean1);
    verifyDescriptionEqual((Describable) describables.toArray()[1], bean2);
}
Also used : DescribableBean(org.codice.ddf.migration.DescribableBean) Describable(org.codice.ddf.platform.services.common.Describable) ArrayList(java.util.ArrayList) ConfigurationMigratable(org.codice.ddf.migration.ConfigurationMigratable) DataMigratable(org.codice.ddf.migration.DataMigratable) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)1 ConfigurationMigratable (org.codice.ddf.migration.ConfigurationMigratable)1 DataMigratable (org.codice.ddf.migration.DataMigratable)1 DescribableBean (org.codice.ddf.migration.DescribableBean)1 Describable (org.codice.ddf.platform.services.common.Describable)1 Test (org.junit.Test)1 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1