@Test public void shouldGetProviderForTDPUsers() { Mockito.when(security.isTDPUser()).thenReturn(true); final List<ViewSettings> settings = provider.getSettings(); assertNotNull(settings); assertEquals(settings.size(), 6); assertTrue(settings.contains(HomeViews.appHeaderBar())); assertTrue(settings.contains(HomeViews.sidePanel())); assertTrue(settings.contains(HomeViews.breadcrumb())); assertTrue(settings.contains(ListViews.folderList())); assertTrue(settings.contains(ListViews.preparationList())); assertTrue(settings.contains(PlaygroundViews.playgroundAppHeaderBar())); }
@Override public List<ViewSettings> getSettings() { List<ViewSettings> settings = new ArrayList<>(5); if (security.isTDPUser()) { settings.add(HomeViews.appHeaderBar()); settings.add(HomeViews.sidePanel()); settings.add(HomeViews.breadcrumb()); settings.add(PlaygroundViews.playgroundAppHeaderBar()); } else { settings.add(HomeViewsForNonTDPUsers.appHeaderBarForNonTdpUsers()); settings.add(HomeViewsForNonTDPUsers.sidePanel()); } settings.addAll(asList(ListViews.folderList(), ListViews.preparationList())); return settings; }
CommonViewsProvider implements AppSettingsProvider<ViewSettings> { @Override public List<ViewSettings> getSettings() { List<ViewSettings> settings = new ArrayList<>(5); if (security.isTDPUser()) { settings.add(HomeViews.appHeaderBar()); settings.add(HomeViews.sidePanel()); settings.add(HomeViews.breadcrumb()); settings.add(PlaygroundViews.playgroundAppHeaderBar()); } else { settings.add(HomeViewsForNonTDPUsers.appHeaderBarForNonTdpUsers()); settings.add(HomeViewsForNonTDPUsers.sidePanel()); } settings.addAll(asList(ListViews.folderList(), ListViews.preparationList())); return settings; } }
CommonViewsProvider implements AppSettingsProvider<ViewSettings> { @Override public List<ViewSettings> getSettings() { List<ViewSettings> settings = new ArrayList<>(5); if (security.isTDPUser()) { settings.add(HomeViews.appHeaderBar()); settings.add(HomeViews.sidePanel()); settings.add(HomeViews.breadcrumb()); settings.add(PlaygroundViews.playgroundAppHeaderBar()); } else { settings.add(HomeViewsForNonTDPUsers.appHeaderBarForNonTdpUsers()); settings.add(HomeViewsForNonTDPUsers.sidePanel()); } settings.addAll(asList(ListViews.folderList(), ListViews.preparationList())); return settings; }  }
CommonViewsProvider implements AppSettingsProvider<ViewSettings> { @Override public List<ViewSettings> getSettings() { List<ViewSettings> settings = new ArrayList<>(5); if (security.isTDPUser()) { settings.add(HomeViews.appHeaderBar()); settings.add(HomeViews.sidePanel()); settings.add(HomeViews.breadcrumb()); settings.add(PlaygroundViews.playgroundAppHeaderBar()); } else { settings.add(HomeViewsForNonTDPUsers.appHeaderBarForNonTdpUsers()); settings.add(HomeViewsForNonTDPUsers.sidePanel()); } settings.addAll(asList(ListViews.folderList(), ListViews.preparationList())); return settings; }  @Override List<ViewSettings> getSettings(); }
CommonViewsProvider implements AppSettingsProvider<ViewSettings> { @Override public List<ViewSettings> getSettings() { List<ViewSettings> settings = new ArrayList<>(5); if (security.isTDPUser()) { settings.add(HomeViews.appHeaderBar()); settings.add(HomeViews.sidePanel()); settings.add(HomeViews.breadcrumb()); settings.add(PlaygroundViews.playgroundAppHeaderBar()); } else { settings.add(HomeViewsForNonTDPUsers.appHeaderBarForNonTdpUsers()); settings.add(HomeViewsForNonTDPUsers.sidePanel()); } settings.addAll(asList(ListViews.folderList(), ListViews.preparationList())); return settings; }  @Override List<ViewSettings> getSettings();  }