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 editedE- 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 ofSimpleBeanEditorDriverthat records its inputs.
-
-
Constructor Summary
Constructors Constructor Description MockSimpleBeanEditorDriver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(EditorVisitor visitor)A no-op method.voidedit(T object)Recordsobject.Tflush()Returnsnullor the last value provided toedit(T).EgetEditor()Returnsnullor the last value provided toinitialize(E).java.util.List<EditorError>getErrors()Returns an empty list.TgetObject()Returnsnullor the last value provided toedit(T).booleanhasErrors()Returnsfalse.voidinitialize(E editor)Recordseditor.booleanisDirty()Returnsfalse.booleansetConstraintViolations(java.lang.Iterable<ConstraintViolation<?>> violations)A no-op method that always returns false.
-
-
-
Method Detail
-
accept
public void accept(EditorVisitor visitor)
A no-op method.- Specified by:
acceptin interfaceEditorDriver<T>
-
edit
public void edit(T object)
Recordsobject.
-
flush
public T flush()
Returnsnullor the last value provided toedit(T).- Specified by:
flushin interfaceEditorDriver<T>- Specified by:
flushin interfaceSimpleBeanEditorDriver<T,E extends Editor<T>>- Returns:
- the object passed into
SimpleBeanEditorDriver.edit(Object)
-
getEditor
public E getEditor()
Returnsnullor the last value provided toinitialize(E).
-
getErrors
public java.util.List<EditorError> getErrors()
Returns an empty list.- Specified by:
getErrorsin interfaceEditorDriver<T>- Returns:
- a List of
EditorErrorinstances
-
hasErrors
public boolean hasErrors()
Returnsfalse.- Specified by:
hasErrorsin interfaceEditorDriver<T>- Returns:
trueif errors are present
-
initialize
public void initialize(E editor)
Recordseditor.- Specified by:
initializein interfaceSimpleBeanEditorDriver<T,E extends Editor<T>>- Parameters:
editor- the Editor to populate
-
isDirty
public boolean isDirty()
Returnsfalse.- Specified by:
isDirtyin interfaceEditorDriver<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:
setConstraintViolationsin interfaceEditorDriver<T>- Parameters:
violations- an Iterable overConstraintViolationinstances- Returns:
trueif there were any unconsumed EditorErrors which can be retrieved fromEditorDriver.getErrors()
-
-