@Test public void shouldSetCustomRestrictionsWhenAddDiscriminatorRestrictionToGridIfLocaleIsntEmpty() { String locale = "pl"; given(view.getComponentByReference(QcadooViewConstants.L_GRID)).willReturn(customTranslationsGrid); given(view.getComponentByReference(LOCALE)).willReturn(localeField); given(localeField.getFieldValue()).willReturn(locale); ArgumentCaptor<CustomRestriction> customRestrictionCaptor = ArgumentCaptor.forClass(CustomRestriction.class); customTranslationsListViewHooks.addDiscriminatorRestrictionToGrid(view); verify(customTranslationsGrid).setCustomRestriction(Mockito.any(CustomRestriction.class)); verify(customTranslationsGrid).setCustomRestriction(customRestrictionCaptor.capture()); customRestriction = customRestrictionCaptor.getValue(); customRestriction.addRestriction(searchCriteriaBuilder); verify(searchCriteriaBuilder).add(Mockito.any(SearchCriterion.class)); }
public void addDiscriminatorRestrictionToGrid(final ViewDefinitionState view, final ComponentState state, final String[] args) { addDiscriminatorRestrictionToGrid(view); }
CustomTranslationsListViewHooks { public void addDiscriminatorRestrictionToGrid(final ViewDefinitionState view, final ComponentState state, final String[] args) { addDiscriminatorRestrictionToGrid(view); } }
CustomTranslationsListViewHooks { public void addDiscriminatorRestrictionToGrid(final ViewDefinitionState view, final ComponentState state, final String[] args) { addDiscriminatorRestrictionToGrid(view); }  }
CustomTranslationsListViewHooks { public void addDiscriminatorRestrictionToGrid(final ViewDefinitionState view, final ComponentState state, final String[] args) { addDiscriminatorRestrictionToGrid(view); }  void updateRibbonState(final ViewDefinitionState view); void setLocaleToDefault(final ViewDefinitionState view); void addDiscriminatorRestrictionToGrid(final ViewDefinitionState view, final ComponentState state, final String[] args); void addDiscriminatorRestrictionToGrid(final ViewDefinitionState view); }
CustomTranslationsListViewHooks { public void addDiscriminatorRestrictionToGrid(final ViewDefinitionState view, final ComponentState state, final String[] args) { addDiscriminatorRestrictionToGrid(view); }  void updateRibbonState(final ViewDefinitionState view); void setLocaleToDefault(final ViewDefinitionState view); void addDiscriminatorRestrictionToGrid(final ViewDefinitionState view, final ComponentState state, final String[] args); void addDiscriminatorRestrictionToGrid(final ViewDefinitionState view);  }