@Test public void testOnFormGenerationSuccess() { final FormGeneratedEvent event = mock(FormGeneratedEvent.class); when(event.getName()).thenReturn("name1"); tested.onFormGeneratedEvent(event); verify(translationService, times(1)).getValue(eq(FormsClientConstants.FormsGenerationSuccess), eq("name1")); verify(formGenerationNotifier, times(1)).showNotification(anyString()); verify(formGenerationNotifier, never()).showError(anyString()); }
void onFormGeneratedEvent(@Observes FormGeneratedEvent event) { formGenerationNotifier.showNotification(translationService.getValue(FormsClientConstants.FormsGenerationSuccess, event.getName())); }
ClientFormGenerationManager { void onFormGeneratedEvent(@Observes FormGeneratedEvent event) { formGenerationNotifier.showNotification(translationService.getValue(FormsClientConstants.FormsGenerationSuccess, event.getName())); } }
ClientFormGenerationManager { void onFormGeneratedEvent(@Observes FormGeneratedEvent event) { formGenerationNotifier.showNotification(translationService.getValue(FormsClientConstants.FormsGenerationSuccess, event.getName())); } protected  ClientFormGenerationManager(); @Inject  ClientFormGenerationManager(final ClientTranslationService translationService,
                                       final FormGenerationNotifier formGenerationNotifier,
                                       final Caller<FormGenerationService> formGenerationService); }
ClientFormGenerationManager { void onFormGeneratedEvent(@Observes FormGeneratedEvent event) { formGenerationNotifier.showNotification(translationService.getValue(FormsClientConstants.FormsGenerationSuccess, event.getName())); } protected  ClientFormGenerationManager(); @Inject  ClientFormGenerationManager(final ClientTranslationService translationService,
                                       final FormGenerationNotifier formGenerationNotifier,
                                       final Caller<FormGenerationService> formGenerationService); void call(final Consumer<FormGenerationService> service); }
ClientFormGenerationManager { void onFormGeneratedEvent(@Observes FormGeneratedEvent event) { formGenerationNotifier.showNotification(translationService.getValue(FormsClientConstants.FormsGenerationSuccess, event.getName())); } protected  ClientFormGenerationManager(); @Inject  ClientFormGenerationManager(final ClientTranslationService translationService,
                                       final FormGenerationNotifier formGenerationNotifier,
                                       final Caller<FormGenerationService> formGenerationService); void call(final Consumer<FormGenerationService> service);  }