@Test public void currentOrganizationalUnitRemovedTest() { final OrganizationalUnit organizationalUnit = mock(OrganizationalUnit.class); doReturn("ou-name").when(organizationalUnit).getName(); presenter.organizationalUnit = organizationalUnit; presenter.onOrganizationalUnitRemoved(new RemoveOrganizationalUnitEvent(organizationalUnit, "admin")); verify(view).hide(); }
public void onOrganizationalUnitRemoved(@Observes final RemoveOrganizationalUnitEvent removedOrganizationalUnitEvent) { if (removedOrganizationalUnitEvent.getOrganizationalUnit().getName().equals(organizationalUnit.getName())) { cancel(); } }
DeleteOrganizationalUnitPopUpPresenter { public void onOrganizationalUnitRemoved(@Observes final RemoveOrganizationalUnitEvent removedOrganizationalUnitEvent) { if (removedOrganizationalUnitEvent.getOrganizationalUnit().getName().equals(organizationalUnit.getName())) { cancel(); } } }
DeleteOrganizationalUnitPopUpPresenter { public void onOrganizationalUnitRemoved(@Observes final RemoveOrganizationalUnitEvent removedOrganizationalUnitEvent) { if (removedOrganizationalUnitEvent.getOrganizationalUnit().getName().equals(organizationalUnit.getName())) { cancel(); } } @Inject  DeleteOrganizationalUnitPopUpPresenter(final View view,
                                                  final Caller<OrganizationalUnitService> organizationalUnitService,
                                                  final OrganizationalUnitController organizationalUnitController,
                                                  final Event<NotificationEvent> notificationEvent,
                                                  final LibraryPlaces libraryPlaces); }
DeleteOrganizationalUnitPopUpPresenter { public void onOrganizationalUnitRemoved(@Observes final RemoveOrganizationalUnitEvent removedOrganizationalUnitEvent) { if (removedOrganizationalUnitEvent.getOrganizationalUnit().getName().equals(organizationalUnit.getName())) { cancel(); } } @Inject  DeleteOrganizationalUnitPopUpPresenter(final View view,
                                                  final Caller<OrganizationalUnitService> organizationalUnitService,
                                                  final OrganizationalUnitController organizationalUnitController,
                                                  final Event<NotificationEvent> notificationEvent,
                                                  final LibraryPlaces libraryPlaces); @PostConstruct void setup(); void show(final OrganizationalUnit organizationalUnit); void delete(); void cancel(); void onOrganizationalUnitRemoved(@Observes final RemoveOrganizationalUnitEvent removedOrganizationalUnitEvent); }
DeleteOrganizationalUnitPopUpPresenter { public void onOrganizationalUnitRemoved(@Observes final RemoveOrganizationalUnitEvent removedOrganizationalUnitEvent) { if (removedOrganizationalUnitEvent.getOrganizationalUnit().getName().equals(organizationalUnit.getName())) { cancel(); } } @Inject  DeleteOrganizationalUnitPopUpPresenter(final View view,
                                                  final Caller<OrganizationalUnitService> organizationalUnitService,
                                                  final OrganizationalUnitController organizationalUnitController,
                                                  final Event<NotificationEvent> notificationEvent,
                                                  final LibraryPlaces libraryPlaces); @PostConstruct void setup(); void show(final OrganizationalUnit organizationalUnit); void delete(); void cancel(); void onOrganizationalUnitRemoved(@Observes final RemoveOrganizationalUnitEvent removedOrganizationalUnitEvent);  }