@Test public void testOnProviderTypeSelectedWithProviders() { ProviderType selectedProviderType = providerTypes.iterator().next(); ProviderTypeKey selectedProviderTypeKey = selectedProviderType.getKey(); List<ProviderKey> providerKeys = mockProviderKeyList(selectedProviderType.getKey(), PROVIDER_TYPES_SIZE); ProviderKey selectedProviderKey = providerKeys.iterator().next(); ProvidersInfo providersInfo = mock(ProvidersInfo.class); when(providersInfo.getProviderType()).thenReturn(selectedProviderType); when(providersInfo.getProvidersKey()).thenReturn(providerKeys); when(providerTypeService.getProviderType(selectedProviderTypeKey)).thenReturn(selectedProviderType); when(provisioningScreensService.getProvidersInfo(selectedProviderTypeKey)).thenReturn(providersInfo); presenter.onProviderTypeSelected(new ProviderTypeSelectedEvent(selectedProviderType.getKey(), selectedProviderKey.getId())); verify(providerTypePresenter, times(1)).setup(selectedProviderType, providerKeys, selectedProviderKey); }
protected void onProviderTypeSelected(@Observes final ProviderTypeSelectedEvent event) { if (event.getProviderTypeKey() != null) { selectProviderType(event.getProviderTypeKey(), event.getProviderId()); } }
ProvisioningManagementBrowserPresenter { protected void onProviderTypeSelected(@Observes final ProviderTypeSelectedEvent event) { if (event.getProviderTypeKey() != null) { selectProviderType(event.getProviderTypeKey(), event.getProviderId()); } } }
ProvisioningManagementBrowserPresenter { protected void onProviderTypeSelected(@Observes final ProviderTypeSelectedEvent event) { if (event.getProviderTypeKey() != null) { selectProviderType(event.getProviderTypeKey(), event.getProviderId()); } } @Inject  ProvisioningManagementBrowserPresenter(final ProvisioningManagementBrowserPresenter.View view,
                                                  final ProviderTypeNavigationPresenter providerTypeNavigationPresenter,
                                                  final ProviderTypePresenter providerTypePresenter,
                                                  final ProviderTypeEmptyPresenter providerTypeEmptyPresenter,
                                                  final ProviderEmptyPresenter providerEmptyPresenter,
                                                  final ProviderPresenter providerPresenter,
                                                  final Caller<ProviderTypeService> providerTypeService,
                                                  final Caller<ProvisioningScreensService> provisioningScreensService,
                                                  final Event<ProviderTypeSelectedEvent> providerTypeSelectedEvent); }
ProvisioningManagementBrowserPresenter { protected void onProviderTypeSelected(@Observes final ProviderTypeSelectedEvent event) { if (event.getProviderTypeKey() != null) { selectProviderType(event.getProviderTypeKey(), event.getProviderId()); } } @Inject  ProvisioningManagementBrowserPresenter(final ProvisioningManagementBrowserPresenter.View view,
                                                  final ProviderTypeNavigationPresenter providerTypeNavigationPresenter,
                                                  final ProviderTypePresenter providerTypePresenter,
                                                  final ProviderTypeEmptyPresenter providerTypeEmptyPresenter,
                                                  final ProviderEmptyPresenter providerEmptyPresenter,
                                                  final ProviderPresenter providerPresenter,
                                                  final Caller<ProviderTypeService> providerTypeService,
                                                  final Caller<ProvisioningScreensService> provisioningScreensService,
                                                  final Event<ProviderTypeSelectedEvent> providerTypeSelectedEvent); @PostConstruct void init(); @OnOpen void onOpen(); @WorkbenchPartTitle String getTitle(); @WorkbenchPartView IsElement getView(); }
ProvisioningManagementBrowserPresenter { protected void onProviderTypeSelected(@Observes final ProviderTypeSelectedEvent event) { if (event.getProviderTypeKey() != null) { selectProviderType(event.getProviderTypeKey(), event.getProviderId()); } } @Inject  ProvisioningManagementBrowserPresenter(final ProvisioningManagementBrowserPresenter.View view,
                                                  final ProviderTypeNavigationPresenter providerTypeNavigationPresenter,
                                                  final ProviderTypePresenter providerTypePresenter,
                                                  final ProviderTypeEmptyPresenter providerTypeEmptyPresenter,
                                                  final ProviderEmptyPresenter providerEmptyPresenter,
                                                  final ProviderPresenter providerPresenter,
                                                  final Caller<ProviderTypeService> providerTypeService,
                                                  final Caller<ProvisioningScreensService> provisioningScreensService,
                                                  final Event<ProviderTypeSelectedEvent> providerTypeSelectedEvent); @PostConstruct void init(); @OnOpen void onOpen(); @WorkbenchPartTitle String getTitle(); @WorkbenchPartView IsElement getView(); static final String IDENTIFIER; }