PatternPage extends BaseDecisionTableColumnPage<T> { @Override public void isComplete(final Callback<Boolean> callback) { boolean isPatternSet = isPatternSet(); if (!isPatternSet) { view.showPatternWarning(); } else { view.hidePatternWarning(); } callback.callback(isPatternSet); } @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();  }
@Test public void testIsCompleteWhenPatternIsSet() { when(plugin.patternWrapper()).thenReturn(newPattern("factType", "", false)); page.isComplete(Assert::assertTrue); verify(view).hidePatternWarning(); verify(view, never()).showPatternWarning(); verify(plugin, never()).isNewColumn(); }
@Test public void testIsCompleteWhenPatternIsNotSet() { when(plugin.patternWrapper()).thenReturn(newPattern("", "", false)); page.isComplete(Assert::assertFalse); verify(view, never()).hidePatternWarning(); verify(view).showPatternWarning(); verify(plugin, never()).isNewColumn(); }