@Test public void testGetPatternsWhenCurrentPatternIsNull() { when(plugin.getPatterns()).thenReturn(fakePatterns()); final Set<PatternWrapper> patterns = page.getPatterns(); assertEquals(2, patterns.size()); }
Set<PatternWrapper> getPatterns() { final Set<PatternWrapper> patterns = plugin().getPatterns(); if (isPatternSet()) { patterns.add(currentPattern()); } if (isNegatedPatternEnabled()) { return patterns; } return patterns .stream() .filter(pattern -> !pattern.isNegated()) .collect(Collectors.toSet()); }
PatternPage extends BaseDecisionTableColumnPage<T> { Set<PatternWrapper> getPatterns() { final Set<PatternWrapper> patterns = plugin().getPatterns(); if (isPatternSet()) { patterns.add(currentPattern()); } if (isNegatedPatternEnabled()) { return patterns; } return patterns .stream() .filter(pattern -> !pattern.isNegated()) .collect(Collectors.toSet()); } }
PatternPage extends BaseDecisionTableColumnPage<T> { Set<PatternWrapper> getPatterns() { final Set<PatternWrapper> patterns = plugin().getPatterns(); if (isPatternSet()) { patterns.add(currentPattern()); } if (isNegatedPatternEnabled()) { return patterns; } return patterns .stream() .filter(pattern -> !pattern.isNegated()) .collect(Collectors.toSet()); } @Inject  PatternPage(final View view,
                       final NewPatternPresenter newPatternPresenter,
                       final TranslationService translationService); }
PatternPage extends BaseDecisionTableColumnPage<T> { Set<PatternWrapper> getPatterns() { final Set<PatternWrapper> patterns = plugin().getPatterns(); if (isPatternSet()) { patterns.add(currentPattern()); } if (isNegatedPatternEnabled()) { return patterns; } return patterns .stream() .filter(pattern -> !pattern.isNegated()) .collect(Collectors.toSet()); } @Inject  PatternPage(final View view,
                       final NewPatternPresenter newPatternPresenter,
                       final TranslationService translationService); @Override void initialise(); @Override String getTitle(); @Override void isComplete(final Callback<Boolean> callback); @Override void prepareView(); GuidedDecisionTableView.Presenter presenter(); void setEditingPattern(final PatternWrapper wrapper); void disableEntryPoint(); boolean isNegatedPatternEnabled(); void disableNegatedPatterns(); boolean isPatternCreationEnabled(); void disablePatternCreation(); }
PatternPage extends BaseDecisionTableColumnPage<T> { Set<PatternWrapper> getPatterns() { final Set<PatternWrapper> patterns = plugin().getPatterns(); if (isPatternSet()) { patterns.add(currentPattern()); } if (isNegatedPatternEnabled()) { return patterns; } return patterns .stream() .filter(pattern -> !pattern.isNegated()) .collect(Collectors.toSet()); } @Inject  PatternPage(final View view,
                       final NewPatternPresenter newPatternPresenter,
                       final TranslationService translationService); @Override void initialise(); @Override String getTitle(); @Override void isComplete(final Callback<Boolean> callback); @Override void prepareView(); GuidedDecisionTableView.Presenter presenter(); void setEditingPattern(final PatternWrapper wrapper); void disableEntryPoint(); boolean isNegatedPatternEnabled(); void disableNegatedPatterns(); boolean isPatternCreationEnabled(); void disablePatternCreation();  }