return getDisabledConfigurationAndEnable( bundle, name, initialState );
}
protected Collection<ComponentConfigurationDTO> getConfigurationsDisabledThenEnable( Bundle b, String name, int count, int initialState) throws InvocationTargetException, InterruptedException
{
ServiceComponentRuntime scr = scrTracker.getService();
if ( scr == null )
{
TestCase.fail("no ServiceComponentRuntime");
}
ComponentDescriptionDTO cd = scr.getComponentDescriptionDTO(b, name);
Assert.assertFalse("Expected component disabled", scr.isComponentEnabled(cd));
scr.enableComponent(cd).getValue();
Assert.assertTrue("Expected component enabled", scr.isComponentEnabled(cd));
Collection<ComponentConfigurationDTO> ccs = scr.getComponentConfigurationDTOs(cd);
Assert.assertEquals(count, ccs.size());
for (ComponentConfigurationDTO cc: ccs) {
Assert.assertEquals("Expected state " + STATES.get(initialState)
+ " but was " + STATES.get(cc.state), initialState,
cc.state);