@Test public void onSettingsSectionChangedWhenChangeTypeTest() { final Section<SpaceScreenModel> section = createSectionMock(); doReturn(true).when(sectionManager).manages(eq(section)); doReturn(SettingsSectionChangeType.CHANGE).when(settingsSectionChangeEvent).getType(); doReturn(section).when(settingsSectionChangeEvent).getSection(); presenter.onSettingsSectionChanged(settingsSectionChangeEvent); verify(sectionManager).updateDirtyIndicator(section); }
public void onSettingsSectionChanged(@Observes final SettingsSectionChange<SpaceScreenModel> settingsSectionChange) { if (sectionManager.manages(settingsSectionChange.getSection())) { if (settingsSectionChange.getType() == SettingsSectionChangeType.CHANGE) { sectionManager.updateDirtyIndicator(settingsSectionChange.getSection()); } else if (settingsSectionChange.getType() == SettingsSectionChangeType.RESET) { setupSection(new SpaceScreenModel(), settingsSectionChange.getSection()); } } }
SettingsScreenPresenter implements HasBusyIndicator { public void onSettingsSectionChanged(@Observes final SettingsSectionChange<SpaceScreenModel> settingsSectionChange) { if (sectionManager.manages(settingsSectionChange.getSection())) { if (settingsSectionChange.getType() == SettingsSectionChangeType.CHANGE) { sectionManager.updateDirtyIndicator(settingsSectionChange.getSection()); } else if (settingsSectionChange.getType() == SettingsSectionChangeType.RESET) { setupSection(new SpaceScreenModel(), settingsSectionChange.getSection()); } } } }
SettingsScreenPresenter implements HasBusyIndicator { public void onSettingsSectionChanged(@Observes final SettingsSectionChange<SpaceScreenModel> settingsSectionChange) { if (sectionManager.manages(settingsSectionChange.getSection())) { if (settingsSectionChange.getType() == SettingsSectionChangeType.CHANGE) { sectionManager.updateDirtyIndicator(settingsSectionChange.getSection()); } else if (settingsSectionChange.getType() == SettingsSectionChangeType.RESET) { setupSection(new SpaceScreenModel(), settingsSectionChange.getSection()); } } } @Inject  SettingsScreenPresenter(final View view,
                                   final TranslationService ts,
                                   final OrganizationalUnitController organizationalUnitController,
                                   final WorkspaceProjectContext projectContext,
                                   final BusyIndicatorView busyIndicatorView,
                                   final SectionManager<SpaceScreenModel> sectionManager,
                                   final @SpaceSettings SettingsSections settingsSections,
                                   final Promises promises,
                                   final Event<NotificationEvent> notificationEvent); }
SettingsScreenPresenter implements HasBusyIndicator { public void onSettingsSectionChanged(@Observes final SettingsSectionChange<SpaceScreenModel> settingsSectionChange) { if (sectionManager.manages(settingsSectionChange.getSection())) { if (settingsSectionChange.getType() == SettingsSectionChangeType.CHANGE) { sectionManager.updateDirtyIndicator(settingsSectionChange.getSection()); } else if (settingsSectionChange.getType() == SettingsSectionChangeType.RESET) { setupSection(new SpaceScreenModel(), settingsSectionChange.getSection()); } } } @Inject  SettingsScreenPresenter(final View view,
                                   final TranslationService ts,
                                   final OrganizationalUnitController organizationalUnitController,
                                   final WorkspaceProjectContext projectContext,
                                   final BusyIndicatorView busyIndicatorView,
                                   final SectionManager<SpaceScreenModel> sectionManager,
                                   final @SpaceSettings SettingsSections settingsSections,
                                   final Promises promises,
                                   final Event<NotificationEvent> notificationEvent); @PostConstruct void postConstruct(); Promise<Void> setupUsingCurrentSection(); View getView(); @Override void showBusyIndicator(final String message); @Override void hideBusyIndicator(); void onSettingsSectionChanged(@Observes final SettingsSectionChange<SpaceScreenModel> settingsSectionChange); void save(); void reset(); }
SettingsScreenPresenter implements HasBusyIndicator { public void onSettingsSectionChanged(@Observes final SettingsSectionChange<SpaceScreenModel> settingsSectionChange) { if (sectionManager.manages(settingsSectionChange.getSection())) { if (settingsSectionChange.getType() == SettingsSectionChangeType.CHANGE) { sectionManager.updateDirtyIndicator(settingsSectionChange.getSection()); } else if (settingsSectionChange.getType() == SettingsSectionChangeType.RESET) { setupSection(new SpaceScreenModel(), settingsSectionChange.getSection()); } } } @Inject  SettingsScreenPresenter(final View view,
                                   final TranslationService ts,
                                   final OrganizationalUnitController organizationalUnitController,
                                   final WorkspaceProjectContext projectContext,
                                   final BusyIndicatorView busyIndicatorView,
                                   final SectionManager<SpaceScreenModel> sectionManager,
                                   final @SpaceSettings SettingsSections settingsSections,
                                   final Promises promises,
                                   final Event<NotificationEvent> notificationEvent); @PostConstruct void postConstruct(); Promise<Void> setupUsingCurrentSection(); View getView(); @Override void showBusyIndicator(final String message); @Override void hideBusyIndicator(); void onSettingsSectionChanged(@Observes final SettingsSectionChange<SpaceScreenModel> settingsSectionChange); void save(); void reset();  }