@Test public void testEnableProviderTypes() { pickSomeProviders(); pickedProviderTypes.forEach(providerType -> provisioningPreferences.getProviderTypeEnablements().put(providerType, Boolean.FALSE)); service.enableProviderTypes(pickedProviderTypes); pickedProviderTypes.forEach(providerType -> assertTrue(provisioningPreferences.getProviderTypeEnablements().get(providerType))); verify(provisioningPreferences, times(pickedProviderTypes.size())).save(preferenceScope); }
@Override public void enableProviderTypes(final Collection<ProviderType> providerTypes) { checkNotEmpty("providerTypes", providerTypes); providerTypes.forEach(providerType -> enableProviderType(providerType, true)); }
ProviderTypeServiceImpl implements ProviderTypeService { @Override public void enableProviderTypes(final Collection<ProviderType> providerTypes) { checkNotEmpty("providerTypes", providerTypes); providerTypes.forEach(providerType -> enableProviderType(providerType, true)); } }
ProviderTypeServiceImpl implements ProviderTypeService { @Override public void enableProviderTypes(final Collection<ProviderType> providerTypes) { checkNotEmpty("providerTypes", providerTypes); providerTypes.forEach(providerType -> enableProviderType(providerType, true)); } ProviderTypeServiceImpl(); @Inject  ProviderTypeServiceImpl(final RuntimeProvisioningServiceBackend runtimeProvisioningService,
                                   final ProvisioningPreferences provisioningPreferences,
                                   final PreferenceScopeFactory scopeFactory); }
ProviderTypeServiceImpl implements ProviderTypeService { @Override public void enableProviderTypes(final Collection<ProviderType> providerTypes) { checkNotEmpty("providerTypes", providerTypes); providerTypes.forEach(providerType -> enableProviderType(providerType, true)); } ProviderTypeServiceImpl(); @Inject  ProviderTypeServiceImpl(final RuntimeProvisioningServiceBackend runtimeProvisioningService,
                                   final ProvisioningPreferences provisioningPreferences,
                                   final PreferenceScopeFactory scopeFactory); @Override Collection<ProviderType> getAvailableProviderTypes(); @Override ProviderType getProviderType(final ProviderTypeKey providerTypeKey); @Override Collection<ProviderType> getEnabledProviderTypes(); @Override void enableProviderTypes(final Collection<ProviderType> providerTypes); @Override void disableProviderType(final ProviderType providerType); @Override Map<ProviderType, ProviderTypeStatus> getProviderTypesStatus(); }
ProviderTypeServiceImpl implements ProviderTypeService { @Override public void enableProviderTypes(final Collection<ProviderType> providerTypes) { checkNotEmpty("providerTypes", providerTypes); providerTypes.forEach(providerType -> enableProviderType(providerType, true)); } ProviderTypeServiceImpl(); @Inject  ProviderTypeServiceImpl(final RuntimeProvisioningServiceBackend runtimeProvisioningService,
                                   final ProvisioningPreferences provisioningPreferences,
                                   final PreferenceScopeFactory scopeFactory); @Override Collection<ProviderType> getAvailableProviderTypes(); @Override ProviderType getProviderType(final ProviderTypeKey providerTypeKey); @Override Collection<ProviderType> getEnabledProviderTypes(); @Override void enableProviderTypes(final Collection<ProviderType> providerTypes); @Override void disableProviderType(final ProviderType providerType); @Override Map<ProviderType, ProviderTypeStatus> getProviderTypesStatus();  }