/** also see {@link RebindWithDeserializingClassRenamesTest} */ @Test public void testPreBasicConfigInheritance_2016_07() throws Exception { doReadConfigInheritance("prebasic-2016-07", "toruf2wxg4"); ConfigKey<?> k = Iterables.getOnlyElement( rebindedApp.config().findKeysDeclared(ConfigPredicates.nameEqualTo("my.config.inheritanceMerged")) ); Asserts.assertStringContains(origMemento, "<parentInheritance class=\"org.apache.brooklyn.config.ConfigInheritance$Merged\"/>"); Asserts.assertStringDoesNotContain(origMemento, BasicConfigInheritance.DEEP_MERGE.getClass().getName()); // should now convert it to BasicConfigInheritance.DEEP_MERGE Asserts.assertStringDoesNotContain(newMemento, "ConfigInheritance$Merged"); Asserts.assertStringDoesNotContain(newMemento, "ConfigInheritance$Legacy$Merged"); Asserts.assertStringContains(newMemento, BasicConfigInheritance.DEEP_MERGE.getClass().getName()); ConfigInheritance inh = k.getInheritanceByContext(InheritanceContext.RUNTIME_MANAGEMENT); Assert.assertEquals(inh, BasicConfigInheritance.DEEP_MERGE); }
ConfigKey<?> key = Iterables.getOnlyElement( entity.config().findKeysDeclared(ConfigPredicates.nameEqualTo("my.param.key")) ); assertEquals(key.getDescription(), "description two"); assertEquals(entity.config().get(key), null); Asserts.assertSize(entity.config().findKeysDeclared(ConfigPredicates.nameMatchesRegex("p.*")), 0);