Package com.google.gwt.editor.client.testing

## Class MockSimpleBeanEditorDriver<T,​E extends Editor<T>>

- java.lang.Object
- - com.google.gwt.editor.client.testing.MockSimpleBeanEditorDriver<T,​E>

- Type Parameters:
    `T` - the type being edited
    `E` - the Editor type
  All Implemented Interfaces:
    `EditorDriver<T>`, `SimpleBeanEditorDriver<T,​E>`

      public class MockSimpleBeanEditorDriver<T,​E extends Editor<T>>
      extends java.lang.Object
      implements SimpleBeanEditorDriver<T,​E>

  A no-op implementation of `SimpleBeanEditorDriver` that records its inputs.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MockSimpleBeanEditorDriver()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `accept​(EditorVisitor visitor)` | A no-op method.
    `void` | `edit​(T object)` | Records `object`.
    `T` | `flush()` | Returns `null` or the last value provided to `edit(T)`.
    `E` | `getEditor()` | Returns `null` or the last value provided to `initialize(E)` .
    `java.util.List<EditorError>` | `getErrors()` | Returns an empty list.
    `T` | `getObject()` | Returns `null` or the last value provided to `edit(T)`.
    `boolean` | `hasErrors()` | Returns `false`.
    `void` | `initialize​(E editor)` | Records `editor`.
    `boolean` | `isDirty()` | Returns `false`.
    `boolean` | `setConstraintViolations​(java.lang.Iterable<ConstraintViolation<?>> violations)` | A no-op method that always returns false.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MockSimpleBeanEditorDriver

          public MockSimpleBeanEditorDriver()

  - ### Method Detail

    - #### accept

          public void accept​(EditorVisitor visitor)

      A no-op method.
      Specified by:
        `accept` in interface `EditorDriver<T>`

    - #### edit

          public void edit​(T object)

      Records `object`.
      Specified by:
        `edit` in interface `SimpleBeanEditorDriver<T,​E extends Editor<T>>`
      Parameters:
        `object` - the object providing input data

    - #### flush

          public T flush()

      Returns `null` or the last value provided to `edit(T)`.
      Specified by:
        `flush` in interface `EditorDriver<T>`
      Specified by:
        `flush` in interface `SimpleBeanEditorDriver<T,​E extends Editor<T>>`
      Returns:
        the object passed into `SimpleBeanEditorDriver.edit(Object)`

    - #### getEditor

          public E getEditor()

      Returns `null` or the last value provided to `initialize(E)` .

    - #### getErrors

          public java.util.List<EditorError> getErrors()

      Returns an empty list.
      Specified by:
        `getErrors` in interface `EditorDriver<T>`
      Returns:
        a List of `EditorError` instances

    - #### getObject

          public T getObject()

      Returns `null` or the last value provided to `edit(T)`.

    - #### hasErrors

          public boolean hasErrors()

      Returns `false`.
      Specified by:
        `hasErrors` in interface `EditorDriver<T>`
      Returns:
        `true` if errors are present

    - #### initialize

          public void initialize​(E editor)

      Records `editor`.
      Specified by:
        `initialize` in interface `SimpleBeanEditorDriver<T,​E extends Editor<T>>`
      Parameters:
        `editor` - the Editor to populate

    - #### isDirty

          public boolean isDirty()

      Returns `false`.
      Specified by:
        `isDirty` in interface `EditorDriver<T>`
      See Also:
        `EditorDelegate.setDirty(boolean)`

    - #### setConstraintViolations

          public boolean setConstraintViolations​(java.lang.Iterable<ConstraintViolation<?>> violations)

      A no-op method that always returns false.
      Specified by:
        `setConstraintViolations` in interface `EditorDriver<T>`
      Parameters:
        `violations` - an Iterable over `ConstraintViolation` instances
      Returns:
        `true` if there were any unconsumed EditorErrors which can be retrieved from `EditorDriver.getErrors()`