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 Object
implements SimpleBeanEditorDriver<T,E>
A no-op implementation of
SimpleBeanEditorDriver that records its
inputs.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(EditorVisitor visitor) A no-op method.voidRecordsobject.flush()Returnsnullor the last value provided toedit(T).Returnsnullor the last value provided toinitialize(E).Returns an empty list.Returnsnullor the last value provided toedit(T).booleanReturnsfalse.voidinitialize(E editor) Recordseditor.booleanisDirty()Returnsfalse.booleansetConstraintViolations(Iterable<ConstraintViolation<?>> violations) A no-op method that always returns false.
-
Constructor Details
-
MockSimpleBeanEditorDriver
public MockSimpleBeanEditorDriver()
-
-
Method Details
-
accept
A no-op method.- Specified by:
acceptin interfaceEditorDriver<T>
-
edit
Recordsobject. -
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
Returnsnullor the last value provided toinitialize(E). -
getErrors
Returns an empty list.- Specified by:
getErrorsin interfaceEditorDriver<T>- Returns:
- a List of
EditorErrorinstances
-
getObject
Returnsnullor the last value provided toedit(T). -
hasErrors
public boolean hasErrors()Returnsfalse.- Specified by:
hasErrorsin interfaceEditorDriver<T>- Returns:
trueif errors are present
-
initialize
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:
-
setConstraintViolations
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()
-