test_class.declarator: view
test_class.modifier: @Mock
test_class.original_string: @Mock ValueBoxEditor.View<String> view;
test_class.type: ValueBoxEditor.View<String>
test_class.var_name: view
test_class.declarator: valueChangeEvent
test_class.modifier: @Mock
test_class.original_string: @Mock EventSourceMock<ValueChangeEvent<String>> valueChangeEvent;
test_class.type: EventSourceMock<ValueChangeEvent<String>>
test_class.var_name: valueChangeEvent
test_class.declarator: presenter
test_class.modifier: private
test_class.original_string: private ValueBoxEditor<String> presenter;
test_class.type: ValueBoxEditor<String>
test_class.var_name: presenter
test_class.file: dashbuilder-client/dashbuilder-common-client/src/test/java/org/dashbuilder/common/client/editor/ValueBoxEditorTest.java
test_class.identifier: ValueBoxEditorTest
test_class.superclass: extends AbstractEditorTest
test_case.body: @Test
      public void testOnValueChanged() throws Exception {
          final String newValue = "newValue";
          presenter.onValueChanged(newValue);
          assertEquals(newValue, presenter.getValue());
          verify(view, times(1)).clearError();
          verify(view, times(0)).setValue(newValue);
          verify(view, times(0)).showError(any(SafeHtml.class));
          verify(view, times(0)).init(presenter);
          verify( valueChangeEvent, times( 1 ) ).fire(any(ValueChangeEvent.class));
      }
test_case.class_method_signature: ValueBoxEditorTest.testOnValueChanged()
test_case.full_signature: @Test public void testOnValueChanged()
test_case.identifier: testOnValueChanged
test_case.invocations: onValueChanged assertEquals getValue clearError verify times setValue verify times showError verify times any init verify times fire verify times any
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testOnValueChanged()
focal_class.declarator: valueChangeEvent
focal_class.original_string: Event<org.dashbuilder.common.client.event.ValueChangeEvent<T>> valueChangeEvent;
focal_class.type: Event<org.dashbuilder.common.client.event.ValueChangeEvent<T>>
focal_class.var_name: valueChangeEvent
focal_class.declarator: view
focal_class.modifier: public
focal_class.original_string: public View<T> view;
focal_class.type: View<T>
focal_class.var_name: view
focal_class.declarator: value
focal_class.original_string: T value;
focal_class.type: T
focal_class.var_name: value
focal_class.file: dashbuilder-client/dashbuilder-common-client/src/main/java/org/dashbuilder/common/client/editor/ValueBoxEditor.java
focal_class.identifier: ValueBoxEditor
focal_class.interfaces: implements IsWidget, LeafAttributeEditor<T>
focal_class.class_method_signature: ValueBoxEditor.ValueBoxEditor(final View<T> view,
                            final Event<org.dashbuilder.common.client.event.ValueChangeEvent<T>> valueChangeEvent)
focal_class.full_signature: @Inject public  ValueBoxEditor(final View<T> view,
                            final Event<org.dashbuilder.common.client.event.ValueChangeEvent<T>> valueChangeEvent)
focal_class.identifier: ValueBoxEditor
focal_class.modifiers: @Inject public
focal_class.parameters: (final View<T> view,
                            final Event<org.dashbuilder.common.client.event.ValueChangeEvent<T>> valueChangeEvent)
focal_class.signature:  ValueBoxEditor(final View<T> view,
                            final Event<org.dashbuilder.common.client.event.ValueChangeEvent<T>> valueChangeEvent)
focal_class.class_method_signature: ValueBoxEditor.init()
focal_class.full_signature: @PostConstruct public void init()
focal_class.identifier: init
focal_class.modifiers: @PostConstruct public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void init()
focal_class.class_method_signature: ValueBoxEditor.addHelpContent(final String title, final String content, final Placement placement)
focal_class.full_signature: public void addHelpContent(final String title, final String content, final Placement placement)
focal_class.identifier: addHelpContent
focal_class.modifiers: public
focal_class.parameters: (final String title, final String content, final Placement placement)
focal_class.return: void
focal_class.signature: void addHelpContent(final String title, final String content, final Placement placement)
focal_class.class_method_signature: ValueBoxEditor.showErrors(List<EditorError> errors)
focal_class.full_signature: @Override public void showErrors(List<EditorError> errors)
focal_class.identifier: showErrors
focal_class.modifiers: @Override public
focal_class.parameters: (List<EditorError> errors)
focal_class.return: void
focal_class.signature: void showErrors(List<EditorError> errors)
focal_class.class_method_signature: ValueBoxEditor.asWidget()
focal_class.full_signature: @Override public Widget asWidget()
focal_class.identifier: asWidget
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Widget
focal_class.signature: Widget asWidget()
focal_class.class_method_signature: ValueBoxEditor.setValue(T value)
focal_class.full_signature: @Override public void setValue(T value)
focal_class.identifier: setValue
focal_class.modifiers: @Override public
focal_class.parameters: (T value)
focal_class.return: void
focal_class.signature: void setValue(T value)
focal_class.class_method_signature: ValueBoxEditor.getValue()
focal_class.full_signature: @Override public T getValue()
focal_class.identifier: getValue
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: T
focal_class.signature: T getValue()
focal_class.class_method_signature: ValueBoxEditor.onValueChanged(final T value)
focal_class.full_signature:  void onValueChanged(final T value)
focal_class.identifier: onValueChanged
focal_class.parameters: (final T value)
focal_class.return: void
focal_class.signature: void onValueChanged(final T value)
focal_method.body: void onValueChanged(final T value) {
          // Check value is not same one as current.
          if (this.value != null && this.value.equals(value)) return;
          
          // Clear error messages on the view.
          view.clearError();
                  
          // Set the new value.
          T before = this.value;
          this.value = value;
  
          // Fire the value change event.
          valueChangeEvent.fire(new org.dashbuilder.common.client.event.ValueChangeEvent<T>(this, before, this.value));
          
      }
focal_method.class_method_signature: ValueBoxEditor.onValueChanged(final T value)
focal_method.full_signature:  void onValueChanged(final T value)
focal_method.identifier: onValueChanged
focal_method.invocations: equals clearError fire
focal_method.parameters: (final T value)
focal_method.return: void
focal_method.signature: void onValueChanged(final T value)