use of org.guvnor.ala.ui.model.ProviderTypeKey in project kie-wb-common by kiegroup.
the class AbstractProviderHandlerRegistryTest method createExpectedKeys.
protected List<ProviderTypeKey> createExpectedKeys() {
List<ProviderTypeKey> keys = new ArrayList<>();
for (int i = 0; i < COUNT; i++) {
ProviderTypeKey key = mock(ProviderTypeKey.class);
keys.add(key);
}
return keys;
}
use of org.guvnor.ala.ui.model.ProviderTypeKey in project kie-wb-common by kiegroup.
the class AbstractProviderHandlerRegistryTest method testGetProvidersHandler.
@Test
public void testGetProvidersHandler() {
for (int i = 0; i < expectedKeys.size(); i++) {
ProviderTypeKey key = expectedKeys.get(i);
assertNotNull(handlerRegistry.isProviderInstalled(key));
ProviderHandler handler = handlerRegistry.getProviderHandler(key);
assertEquals(expectedHandlers.get(i), handler);
}
}
use of org.guvnor.ala.ui.model.ProviderTypeKey in project kie-wb-common by kiegroup.
the class AbstractProviderHandlerRegistryTest method testGetProviderHandlerMissing.
@Test
public void testGetProviderHandlerMissing() {
ProviderTypeKey providerTypeKey = mock(ProviderTypeKey.class);
assertNull(handlerRegistry.getProviderHandler(providerTypeKey));
}
use of org.guvnor.ala.ui.model.ProviderTypeKey in project kie-wb-common by kiegroup.
the class BaseProviderHandlerTest method expectedProviderType.
protected ProviderTypeKey expectedProviderType() {
ProviderTypeKey providerTypeKey = mock(ProviderTypeKey.class);
when(providerTypeKey.getId()).thenReturn(getProviderTypeName());
return providerTypeKey;
}
use of org.guvnor.ala.ui.model.ProviderTypeKey in project kie-wb-common by kiegroup.
the class ProviderTypeServiceImpl method getAvailableProviderTypes.
@Override
public Collection<ProviderType> getAvailableProviderTypes() {
List<ProviderType> result = new ArrayList<>();
List<org.guvnor.ala.runtime.providers.ProviderType> providers = runtimeProvisioningService.getProviderTypes(0, 100, PROVIDER_TYPE_NAME_SORT, true);
if (providers != null) {
providers.forEach(providerType -> result.add(new ProviderType(new ProviderTypeKey(providerType.getProviderTypeName(), providerType.getVersion()), providerType.getProviderTypeName())));
}
return result;
}
Aggregations