@Test public void testExecuteOnCompleteCallback() { final Command defaultCommand = mock(Command.class); final Command customCommand = mock(Command.class); when(constraintEnumeration.defaultOnCompleteCallback()).thenReturn(defaultCommand); constraintEnumeration.registerOnCompleteCallback(customCommand); constraintEnumeration.executeOnCompleteCallback(); constraintEnumeration.executeOnCompleteCallback(); constraintEnumeration.executeOnCompleteCallback(); verify(customCommand).execute(); verify(defaultCommand, times(2)).execute(); }
void executeOnCompleteCallback() { onCompleteCallback.execute(); registerOnCompleteCallback(defaultOnCompleteCallback()); }
DataTypeConstraintEnumeration implements DataTypeConstraintComponent { void executeOnCompleteCallback() { onCompleteCallback.execute(); registerOnCompleteCallback(defaultOnCompleteCallback()); } }
DataTypeConstraintEnumeration implements DataTypeConstraintComponent { void executeOnCompleteCallback() { onCompleteCallback.execute(); registerOnCompleteCallback(defaultOnCompleteCallback()); } @Inject  DataTypeConstraintEnumeration(final View view,
                                         final DMNClientServicesProxy clientServicesProxy,
                                         final ScrollHelper scrollHelper,
                                         final Event<DataTypeConstraintParserWarningEvent> parserWarningEvent,
                                         final ManagedInstance<DataTypeConstraintEnumerationItem> enumerationItemInstances); }
DataTypeConstraintEnumeration implements DataTypeConstraintComponent { void executeOnCompleteCallback() { onCompleteCallback.execute(); registerOnCompleteCallback(defaultOnCompleteCallback()); } @Inject  DataTypeConstraintEnumeration(final View view,
                                         final DMNClientServicesProxy clientServicesProxy,
                                         final ScrollHelper scrollHelper,
                                         final Event<DataTypeConstraintParserWarningEvent> parserWarningEvent,
                                         final ManagedInstance<DataTypeConstraintEnumerationItem> enumerationItemInstances); @Override String getValue(); @Override void setValue(final String value); @Override void setConstraintValueType(final String type); void refreshView(); void refreshView(final Command onCompleteCallback); @Override Element getElement(); void render(); void scrollToPosition(final int position); List<DataTypeConstraintEnumerationItem> getEnumerationItems(); }
DataTypeConstraintEnumeration implements DataTypeConstraintComponent { void executeOnCompleteCallback() { onCompleteCallback.execute(); registerOnCompleteCallback(defaultOnCompleteCallback()); } @Inject  DataTypeConstraintEnumeration(final View view,
                                         final DMNClientServicesProxy clientServicesProxy,
                                         final ScrollHelper scrollHelper,
                                         final Event<DataTypeConstraintParserWarningEvent> parserWarningEvent,
                                         final ManagedInstance<DataTypeConstraintEnumerationItem> enumerationItemInstances); @Override String getValue(); @Override void setValue(final String value); @Override void setConstraintValueType(final String type); void refreshView(); void refreshView(final Command onCompleteCallback); @Override Element getElement(); void render(); void scrollToPosition(final int position); List<DataTypeConstraintEnumerationItem> getEnumerationItems();  }